ip6gretap: Fix MTU to allow for Ethernet header
[deliverable/linux.git] / net / ipv6 / ip6_gre.c
index 4e636e60a360d5c22dc856c2c80d361127ba41b6..2be66e7b4a78ab05a51c836b09c6085e1c484c39 100644 (file)
@@ -987,6 +987,8 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu)
                                dev->mtu = rt->dst.dev->mtu - addend;
                                if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
                                        dev->mtu -= 8;
+                               if (dev->type == ARPHRD_ETHER)
+                                       dev->mtu -= ETH_HLEN;
 
                                if (dev->mtu < IPV6_MIN_MTU)
                                        dev->mtu = IPV6_MIN_MTU;
This page took 0.024319 seconds and 5 git commands to generate.