aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorVille Nuorvala <vnuorval@tcs.hut.fi>2006-11-24 20:06:53 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:30:25 -0500
commit305d4b3ce8c2f00643edc3bb19f005f72e8f84fc (patch)
treec004e115441d3a0ce8fc03ff7a39def0114df2d5 /net/ipv6
parent09c6bbf090ecb52c8d670fa4d5730be134a8ec8b (diff)
[IPV6]: Allow link-local tunnel endpoints
Allow link-local tunnel endpoints if the underlying link is defined. Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
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;