diff options
author | Shmulik Ladkani <sladkani@proofpoint.com> | 2019-12-25 10:51:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-27 16:35:32 -0800 |
commit | 70cf3dc7313207816255b9acb0dffb19dae78144 (patch) | |
tree | 70c0d31b107bf18fd277f6e582cf88bff57ee5a4 /net/caif/Kconfig | |
parent | bb3d0b8bf5be61ab1d6f472c43cbf34de17e796b (diff) | |
download | linux-70cf3dc7313207816255b9acb0dffb19dae78144.tar.bz2 |
net/sched: act_mirred: Pull mac prior redir to non mac_header_xmit device
There's no skb_pull performed when a mirred action is set at egress of a
mac device, with a target device/action that expects skb->data to point
at the network header.
As a result, either the target device is errornously given an skb with
data pointing to the mac (egress case), or the net stack receives the
skb with data pointing to the mac (ingress case).
E.g:
# tc qdisc add dev eth9 root handle 1: prio
# tc filter add dev eth9 parent 1: prio 9 protocol ip handle 9 basic \
action mirred egress redirect dev tun0
(tun0 is a tun device. result: tun0 errornously gets the eth header
instead of the iph)
Revise the push/pull logic of tcf_mirred_act() to not rely on the
skb_at_tc_ingress() vs tcf_mirred_act_wants_ingress() comparison, as it
does not cover all "pull" cases.
Instead, calculate whether the required action on the target device
requires the data to point at the network header, and compare this to
whether skb->data points to network header - and make the push/pull
adjustments as necessary.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Shmulik Ladkani <sladkani@proofpoint.com>
Tested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/Kconfig')
0 files changed, 0 insertions, 0 deletions