[LARTC] set skb->priority with ping

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a multi-part message in MIME format.
--------------030204050705080709080104
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi !

While playing around with skb->priority i made a new option -P for ping 
to direct icmp echo packets to a particular class. It's not very useful
because it only has any effect if no filter are attached to the parent 
(at least i think so), but maybe someone else finds it useful.
The patch applies against iputils-ss020124.

Bye,
Patrick

--------------030204050705080709080104
Content-Type: text/plain;
 name="ping.diff"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="ping.diff"

LS0tIGlwdXRpbHMvcGluZy5jCVN1biBEZWMgIDIgMTk6Mjg6MzIgMjAwMQorKysgaXB1dGls
cy1wcmlvL3BpbmcuYwlUaHUgQXByIDE4IDE3OjA2OjU0IDIwMDIKQEAgLTc5LDYgKzc5LDcg
QEAKIHN0cnVjdCBzb2NrYWRkcl9pbiB3aGVyZXRvOwkvKiB3aG8gdG8gcGluZyAqLwogaW50
IG9wdGxlbiA9IDA7CiBpbnQgc2V0dG9zID0gMDsJCQkvKiBTZXQgVE9TLCBQcmVjZW5kZW5j
ZSBvciBvdGhlciBRT1Mgb3B0aW9ucyAqLworaW50IHByaW9yaXR5ID0gMDsJCS8qIHNrYi0+
cHJpb3JpdHkgKi8KIGludCBpY21wX3NvY2s7CQkJLyogc29ja2V0IGZpbGUgZGVzY3JpcHRv
ciAqLwogdV9jaGFyIG91dHBhY2tbMHgxMDAwMF07CiBpbnQgbWF4cGFja2V0ID0gc2l6ZW9m
KG91dHBhY2spOwpAQCAtOTIsNiArOTMsNyBAQAogc3RhdGljIHVfc2hvcnQgaW5fY2tzdW0o
Y29uc3QgdV9zaG9ydCAqYWRkciwgaW50IGxlbiwgdV9zaG9ydCBzYWx0KTsKIHN0YXRpYyB2
b2lkIHByX2ljbXBoKF9fdTggdHlwZSwgX191OCBjb2RlLCBfX3UzMiBpbmZvLCBzd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SBiZSB1c2VkXG4iKTsKQEAgLTEx
NTgsNiArMTE2OSwxOCBAQAogCXJldHVybih0b3MpOwogfQogCisjaW5jbHVkZSA8bGludXgv
cGt0X3NjaGVkLmg+CisKK2ludCBwYXJzZXByaW9yaXR5KGNvbnN0IGNoYXIgKnN0cikKK3sK
KwljaGFyICpzZXA7CisJCisJaWYgKChzZXAgPSBzdHJzdHIoc3RyLCAiOiIpKSA9PSBOVUxM
KQorCQlyZXR1cm4gYXRvaShzdHIpOworCSpzZXAgPSAnXDAnOworCXJldHVybiBUQ19IX01B
S0UoYXRvaShzdHIpIDw8IDE2LCBhdG9pKHNlcCArIDEpKTsKK30KKwkKICNpbmNsdWRlIDxs
aW51eC9maWx0ZXIuaD4KIAogdm9pZCBpbnN0YWxsX2ZpbHRlcih2b2lkKQpAQCAtMTE5Niw2
ICsxMjE5LDYgQEAKICJVc2FnZTogcGluZyBbLUxSVWJkZm5xcnZWYUFdIFstYyBjb3VudF0g
Wy1pIGludGVydmFsXSBbLXcgZGVhZGxpbmVdXG4iCiAiICAgICAgICAgICAgWy1wIHBhdHRl
cm5dIFstcyBwYWNrZXRzaXplXSBbLXQgdHRsXSBbLUkgaW50ZXJmYWNlIG9yIGFkZHJlc3Nd
XG4iCiAiICAgICAgICAgICAgWy1NIG10dSBkaXNjb3ZlcnkgaGludF0gWy1TIHNuZGJ1Zl1c
biIKLSIgICAgICAgICAgICBbIC1UIHRpbWVzdGFtcCBvcHRpb24gXSBbIC1RIHRvcyBdIFto
b3AxIC4uLl0gZGVzdGluYXRpb25cbiIpOworIiAgICAgICAgICAgIFsgLVQgdGltZXN0YW1w
IG9wdGlvbiBdIFsgLVEgdG9zIF0gWyAtUCBjbGFzc2lkIF0gW2hvcDEgLi4uXSBkZXN0aW5h
dGlvblxuIik7CiAJZXhpdCgyKTsKIH0K
--------------030204050705080709080104--



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux