aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-12-08 16:15:38 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-08 16:47:38 -0500
commitfe6c791570efe717946ea7b7dd50aec96b70d551 (patch)
tree1becb5e8aea7a9c9a7d78f987bd73b0a5d8ee434 /net/ipv6
parentf8bf5681cf15f77692c8ad8cb95d059ff7c622c9 (diff)
parentf19872575ff7819a3723154657a497d9bca66b33 (diff)
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')
-rw-r--r--net/ipv6/ip6_tunnel.c7
-rw-r--r--net/ipv6/sit.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index b1155554bb18..4f4483e697bd 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)
1173 sizeof (struct ipv6hdr); 1173 sizeof (struct ipv6hdr);
1174 1174
1175 dev->mtu = rt->rt6i_dev->mtu - sizeof (struct ipv6hdr); 1175 dev->mtu = rt->rt6i_dev->mtu - sizeof (struct ipv6hdr);
1176 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
1177 dev->mtu-=8;
1176 1178
1177 if (dev->mtu < IPV6_MIN_MTU) 1179 if (dev->mtu < IPV6_MIN_MTU)
1178 dev->mtu = IPV6_MIN_MTU; 1180 dev->mtu = IPV6_MIN_MTU;
@@ -1361,12 +1363,17 @@ static const struct net_device_ops ip6_tnl_netdev_ops = {
1361 1363
1362static void ip6_tnl_dev_setup(struct net_device *dev) 1364static void ip6_tnl_dev_setup(struct net_device *dev)
1363{ 1365{
1366 struct ip6_tnl *t;
1367
1364 dev->netdev_ops = &ip6_tnl_netdev_ops; 1368 dev->netdev_ops = &ip6_tnl_netdev_ops;
1365 dev->destructor = ip6_dev_free; 1369 dev->destructor = ip6_dev_free;
1366 1370
1367 dev->type = ARPHRD_TUNNEL6; 1371 dev->type = ARPHRD_TUNNEL6;
1368 dev->hard_header_len = LL_MAX_HEADER + sizeof (struct ipv6hdr); 1372 dev->hard_header_len = LL_MAX_HEADER + sizeof (struct ipv6hdr);
1369 dev->mtu = ETH_DATA_LEN - sizeof (struct ipv6hdr); 1373 dev->mtu = ETH_DATA_LEN - sizeof (struct ipv6hdr);
1374 t = netdev_priv(dev);
1375 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
1376 dev->mtu-=8;
1370 dev->flags |= IFF_NOARP; 1377 dev->flags |= IFF_NOARP;
1371 dev->addr_len = sizeof(struct in6_addr); 1378 dev->addr_len = sizeof(struct in6_addr);
1372 dev->features |= NETIF_F_NETNS_LOCAL; 1379 dev->features |= NETIF_F_NETNS_LOCAL;
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 6e48a80d0f25..8ce38f10a547 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -606,8 +606,9 @@ static int ipip6_rcv(struct sk_buff *skb)
606 return 0; 606 return 0;
607 } 607 }
608 608
609 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); 609 /* no tunnel matched, let upstream know, ipsec may handle it */
610 rcu_read_unlock(); 610 rcu_read_unlock();
611 return 1;
611out: 612out:
612 kfree_skb(skb); 613 kfree_skb(skb);
613 return 0; 614 return 0;