Message ID | 1524673309-30044-9-git-send-email-gvrose8192@gmail.com |
---|---|
State | Deferred |
Headers | show |
Series | Patches 1-11 of ERSPAN backport | expand |
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index caa6e6c..7a4b5af 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -1044,7 +1044,9 @@ static int erspan_tunnel_init(struct net_device *dev) tunnel->tun_hlen = 8; tunnel->parms.iph.protocol = IPPROTO_GRE; - t_hlen = tunnel->hlen + sizeof(struct iphdr) + sizeof(struct erspanhdr); + tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen + + sizeof(struct erspanhdr); + t_hlen = tunnel->hlen + sizeof(struct iphdr); dev->needed_headroom = LL_MAX_HEADER + t_hlen + 4; dev->mtu = ETH_DATA_LEN - t_hlen - 4;