summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGuillaume Nault <gnault@redhat.com>2021-06-25 15:33:17 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-28 12:44:17 -0700
commitda5a2e49f064a86a3b102b20c545f855a7298394 (patch)
tree2a26be712e9cb30cb40d298fb41e25d5198125e5 /drivers
parentaab1e898c26c3e4289c62b6d6482948672fab939 (diff)
ip6_tunnel: allow redirecting ip6gre and ipxip6 packets to eth devices
Reset the mac_header pointer even when the tunnel transports only L3 data (in the ARPHRD_ETHER case, this is already done by eth_type_trans). This prevents other parts of the stack from mistakenly accessing the outer header after the packet has been decapsulated. In practice, this allows to push an Ethernet header to ipip6, ip6ip6, mplsip6 or ip6gre packets and redirect them to an Ethernet device: $ tc filter add dev ip6tnl0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Without this patch, push_eth refuses to add an ethernet header because the skb appears to already have a MAC header. Signed-off-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions