diff options
author | David S. Miller <davem@davemloft.net> | 2010-12-08 13:15:38 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-08 13:47:38 -0800 |
commit | fe6c791570efe717946ea7b7dd50aec96b70d551 (patch) | |
tree | 1becb5e8aea7a9c9a7d78f987bd73b0a5d8ee434 /net/ipv6/ip6_tunnel.c | |
parent | f8bf5681cf15f77692c8ad8cb95d059ff7c622c9 (diff) | |
parent | f19872575ff7819a3723154657a497d9bca66b33 (diff) | |
download | linux-3.10-fe6c791570efe717946ea7b7dd50aec96b70d551.tar.gz linux-3.10-fe6c791570efe717946ea7b7dd50aec96b70d551.tar.bz2 linux-3.10-fe6c791570efe717946ea7b7dd50aec96b70d551.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
net/llc/af_llc.c
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index b1155554bb1..4f4483e697b 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -1173,6 +1173,8 @@ static void ip6_tnl_link_config(struct ip6_tnl *t) sizeof (struct ipv6hdr); dev->mtu = rt->rt6i_dev->mtu - sizeof (struct ipv6hdr); + if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) + dev->mtu-=8; if (dev->mtu < IPV6_MIN_MTU) dev->mtu = IPV6_MIN_MTU; @@ -1361,12 +1363,17 @@ static const struct net_device_ops ip6_tnl_netdev_ops = { static void ip6_tnl_dev_setup(struct net_device *dev) { + struct ip6_tnl *t; + dev->netdev_ops = &ip6_tnl_netdev_ops; dev->destructor = ip6_dev_free; dev->type = ARPHRD_TUNNEL6; dev->hard_header_len = LL_MAX_HEADER + sizeof (struct ipv6hdr); dev->mtu = ETH_DATA_LEN - sizeof (struct ipv6hdr); + t = netdev_priv(dev); + if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) + dev->mtu-=8; dev->flags |= IFF_NOARP; dev->addr_len = sizeof(struct in6_addr); dev->features |= NETIF_F_NETNS_LOCAL; |