aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/ip_gre.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 205a2b8a5a84..4cc84212cce1 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -398,7 +398,10 @@ static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi)
398 iph->saddr, iph->daddr, tpi->key); 398 iph->saddr, iph->daddr, tpi->key);
399 399
400 if (tunnel) { 400 if (tunnel) {
401 skb_pop_mac_header(skb); 401 if (tunnel->dev->type != ARPHRD_NONE)
402 skb_pop_mac_header(skb);
403 else
404 skb_reset_mac_header(skb);
402 if (tunnel->collect_md) { 405 if (tunnel->collect_md) {
403 __be16 flags; 406 __be16 flags;
404 __be64 tun_id; 407 __be64 tun_id;
@@ -1031,6 +1034,8 @@ static void ipgre_netlink_parms(struct net_device *dev,
1031 struct ip_tunnel *t = netdev_priv(dev); 1034 struct ip_tunnel *t = netdev_priv(dev);
1032 1035
1033 t->collect_md = true; 1036 t->collect_md = true;
1037 if (dev->type == ARPHRD_IPGRE)
1038 dev->type = ARPHRD_NONE;
1034 } 1039 }
1035} 1040}
1036 1041