]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv4: Control SKB reprioritization after forwarding
authorPetr Machata <petrm@mellanox.com>
Tue, 31 Jul 2018 22:36:03 +0000 (00:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Aug 2018 16:52:30 +0000 (09:52 -0700)
commitae5de211f0d1f1b6d31382544b5dc111673fb0a5
tree4c6becb6e6fa05882ba97f5ed121ad7d29eb6b33
parente37cf0b578fae808966c8ad20377b7d408a37785
net: ipv4: Control SKB reprioritization after forwarding

After IPv4 packets are forwarded, the priority of the corresponding SKB
is updated according to the TOS field of IPv4 header. This overrides any
prioritization done earlier by e.g. an skbedit action or ingress-qos-map
defined at a vlan device.

Such overriding may not always be desirable. Even if the packet ends up
being routed, which implies this is an L3 network node, an administrator
may wish to preserve whatever prioritization was done earlier on in the
pipeline.

Therefore introduce a sysctl that controls this behavior. Keep the
default value at 1 to maintain backward-compatible behavior.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ip-sysctl.txt
include/net/netns/ipv4.h
net/ipv4/af_inet.c
net/ipv4/ip_forward.c
net/ipv4/sysctl_net_ipv4.c