Searched hist:"7 ad136fd288c0e0177eb29e04ec289e1b873b270" (Results 1 – 1 of 1) sorted by relevance
/linux/net/ipv4/ |
H A D | ipip.c | diff 7ad136fd288c0e0177eb29e04ec289e1b873b270 Fri Jun 25 15:33:04 CEST 2021 Guillaume Nault <gnault@redhat.com> ipip: allow redirecting ipip and mplsip packets to eth devices
Even though ipip transports 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.
This allows to push an Ethernet header to ipip or mplsip packets and redirect them to an Ethernet device:
$ tc filter add dev ipip0 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>
|