aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_tunnel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 22debbf28b8a..3944ea24c38c 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -460,6 +460,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
460 if (rel_msg && pskb_may_pull(skb, offset + sizeof (*ipv6h))) { 460 if (rel_msg && pskb_may_pull(skb, offset + sizeof (*ipv6h))) {
461 struct rt6_info *rt; 461 struct rt6_info *rt;
462 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); 462 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
463
463 if (!skb2) 464 if (!skb2)
464 goto out; 465 goto out;
465 466
@@ -824,7 +825,7 @@ static void ip6_tnl_set_cap(struct ip6_tnl *t)
824 if (ltype & (IPV6_ADDR_UNICAST|IPV6_ADDR_MULTICAST) && 825 if (ltype & (IPV6_ADDR_UNICAST|IPV6_ADDR_MULTICAST) &&
825 rtype & (IPV6_ADDR_UNICAST|IPV6_ADDR_MULTICAST) && 826 rtype & (IPV6_ADDR_UNICAST|IPV6_ADDR_MULTICAST) &&
826 !((ltype|rtype) & IPV6_ADDR_LOOPBACK) && 827 !((ltype|rtype) & IPV6_ADDR_LOOPBACK) &&
827 !((ltype|rtype) & IPV6_ADDR_LINKLOCAL)) { 828 (!((ltype|rtype) & IPV6_ADDR_LINKLOCAL) || p->link)) {
828 if (ltype&IPV6_ADDR_UNICAST) 829 if (ltype&IPV6_ADDR_UNICAST)
829 p->flags |= IP6_TNL_F_CAP_XMIT; 830 p->flags |= IP6_TNL_F_CAP_XMIT;
830 if (rtype&IPV6_ADDR_UNICAST) 831 if (rtype&IPV6_ADDR_UNICAST)
@@ -862,8 +863,11 @@ static void ip6ip6_tnl_link_config(struct ip6_tnl *t)
862 dev->iflink = p->link; 863 dev->iflink = p->link;
863 864
864 if (p->flags & IP6_TNL_F_CAP_XMIT) { 865 if (p->flags & IP6_TNL_F_CAP_XMIT) {
866 int strict = (ipv6_addr_type(&p->raddr) &
867 (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL));
868
865 struct rt6_info *rt = rt6_lookup(&p->raddr, &p->laddr, 869 struct rt6_info *rt = rt6_lookup(&p->raddr, &p->laddr,
866 p->link, 0); 870 p->link, strict);
867 871
868 if (rt == NULL) 872 if (rt == NULL)
869 return; 873 return;