aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorGuillaume Nault2021-06-25 15:33:08 +0200
committerDavid S. Miller2021-06-28 12:44:17 -0700
commit730eed2772e740c30229d03e3d578cc00a5ae304 (patch)
tree9a2cb74aaa158dab88e2dfb5d31f684bdee20cf4 /net/ipv6/ndisc.c
parent7ad136fd288c0e0177eb29e04ec289e1b873b270 (diff)
sit: allow redirecting ip6ip, ipip and mplsip packets to eth devices
Even though sit transports L3 data (IPv6, IPv4 or MPLS) packets, it needs to reset the mac_header pointer, so that other parts of the stack don't mistakenly access the outer header after the packet has been decapsulated. There are two rx handlers to modify: ipip6_rcv() for the ip6ip mode and sit_tunnel_rcv() which is used to re-implement the ipip and mplsip modes of ipip.ko. This allows to push an Ethernet header to sit packets and redirect them to an Ethernet device: $ tc filter add dev sit0 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 'net/ipv6/ndisc.c')
0 files changed, 0 insertions, 0 deletions