[ovs-dev] [PATCH net-next v11 2/6] gre: unset mac header for non-TEB packets received by ipgre device
Simon Horman
simon.horman at netronome.com
Wed Jul 6 17:59:52 UTC 2016
unset rather than reset mach header for non-TEB packets received by an
ipgre device. This allows skb_transport_header_was_set to be subsequently
used to differentiate TEB and non-TEB packets recieved on an ipgre device.
Signed-off-by: Simon Horman <simon.horman at netronome.com>
---
v11
* New patch
---
net/ipv4/ip_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 5b1481be0282..330d58e9c523 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -283,6 +283,8 @@ static int __ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
if (tunnel->dev->type != ARPHRD_NONE)
skb_pop_mac_header(skb);
+ else if (tpi->proto != htons(ETH_P_TEB))
+ skb_unset_mac_header(skb);
else
skb_reset_mac_header(skb);
if (tunnel->collect_md) {
--
2.7.0.rc3.207.g0ac5344
More information about the dev
mailing list