[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1467827996-32547-3-git-send-email-simon.horman@netronome.com>
Date: Wed, 6 Jul 2016 19:59:52 +0200
From: Simon Horman <simon.horman@...ronome.com>
To: netdev@...r.kernel.org
Cc: dev@...nvswitch.org
Subject: [PATCH net-next v11 2/6] gre: unset mac header for non-TEB packets received by ipgre device
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@...ronome.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
Powered by blists - more mailing lists