Skip to contentSkip to conversation

IPv6: Allow link-local tunnel endpoints

PATCH In review Ville Nuorvala 2 participants 2 messages Nov 2, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 IPv6: Allow link-local tunnel endpoints

Quoted 1 line

From de1ad3df949303a1454ae0cdee0a599c0fc95e45 Mon Sep 17 00:00:00 2001

From: Ville Nuorvala <[email protected]>
Date: Thu, 2 Nov 2006 12:45:08 +0200
Subject: [PATCH 3/6] IPv6: Allow link-local tunnel endpoints

Allow link-local tunnel endpoints if the underlying link is defined.

---
 net/ipv6/ip6_tunnel.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
net/ipv6/ip6_tunnel.c +6 -2
index 2467b04..008bd11 100644
@@ -460,6 +460,7 @@ ip6ip6_err(struct sk_buff *skb, struct i
 	if (rel_msg &&  pskb_may_pull(skb, offset + sizeof (*ipv6h))) {
 		struct rt6_info *rt;
 		struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
+
 		if (!skb2)
 			goto out;
 
@@ -823,7 +824,7 @@ static void ip6_tnl_set_cap(struct ip6_t
 	if (ltype & (IPV6_ADDR_UNICAST|IPV6_ADDR_MULTICAST) &&
 	    rtype & (IPV6_ADDR_UNICAST|IPV6_ADDR_MULTICAST) &&
 	    !((ltype|rtype) & IPV6_ADDR_LOOPBACK) &&
-	    !((ltype|rtype) & IPV6_ADDR_LINKLOCAL)) {
+	    (!((ltype|rtype) & IPV6_ADDR_LINKLOCAL) || p->link)) {
 		if (ltype&IPV6_ADDR_UNICAST)
 			p->flags |= IP6_TNL_F_CAP_XMIT;
 		if (rtype&IPV6_ADDR_UNICAST)
@@ -861,8 +862,11 @@ static void ip6ip6_tnl_link_config(struc
 	dev->iflink = p->link;
 
 	if (p->flags & IP6_TNL_F_CAP_XMIT) {
+		int strict = (ipv6_addr_type(&p->raddr) &
+			      (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL));
+
 		struct rt6_info *rt = rt6_lookup(&p->raddr, &p->laddr,
-						 p->link, 0);
+						 p->link, strict);
 
 		if (rt == NULL)
 			return;
Signature · 1 line
1.4.3.2
#1 lore raw

In article <[email protected]> (at Thu, 02 Nov 2006 13:33:48 +0200), Ville Nuorvala <[email protected]> says:

Quoted 8 lines
Quoted 1 line

From de1ad3df949303a1454ae0cdee0a599c0fc95e45 Mon Sep 17 00:00:00 2001

From: Ville Nuorvala <[email protected]>
Date: Thu, 2 Nov 2006 12:45:08 +0200
Subject: [PATCH 3/6] IPv6: Allow link-local tunnel endpoints

Allow link-local tunnel endpoints if the underlying link is defined.

--yoshfuji