Skip to contentSkip to conversation

: CONFIG_IPV6_SUBTREES fix for MIPv6

PATCH In review Ville Nuorvala 7 participants 37 messages May 30, 2003 – Jun 13, 2003 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 : CONFIG_IPV6_SUBTREES fix for MIPv6

In reply to a message not in the archive

Hi guys,

here is a patch that fixes CONFIG_IPV6_SUBTREES and allows overriding normal routes with source address specific ones. This is for example needed in MIPv6 for handling the traffic to and from a mobile node's home address correctly.

The patch is sent as an attachment to this mail but is also available at:

http://www.mipl.mediapoli.com/patches/source-routing.patch

Regards,
Ville Nuorvala
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

include/linux/ipv6.h +3 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/ipv6.h merge-2.5/include/linux/ipv6.h
@@ -150,7 +150,9 @@
 	struct in6_addr 	rcv_saddr;
 	struct in6_addr		daddr;
 	struct in6_addr		*daddr_cache;
-
+#ifdef CONFIG_IPV6_SUBTREES
+	struct in6_addr		*saddr_cache;
+#endif
 	__u32			flow_label;
 	__u32			frag_size;
 	int			hop_limit;
include/net/ip6_route.h +5 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/net/ip6_route.h merge-2.5/include/net/ip6_route.h
@@ -102,7 +102,8 @@
  */
 
 static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
-				     struct in6_addr *daddr)
+				 struct in6_addr *daddr,
+				 struct in6_addr *saddr)
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct rt6_info *rt = (struct rt6_info *) dst;
@@ -110,6 +111,9 @@
 	write_lock(&sk->dst_lock);
 	__sk_dst_set(sk, dst);
 	np->daddr_cache = daddr;
+#ifdef CONFIG_IPV6_SUBTREES
+	np->saddr_cache = saddr;
+#endif
 	np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
 	write_unlock(&sk->dst_lock);
 }
net/ipv6/Kconfig +8 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Kconfig merge-2.5/net/ipv6/Kconfig
@@ -42,4 +42,12 @@
 
 	  If unsure, say Y.
 
+config IPV6_SUBTREES
+	bool "IPv6: Source address routing"
+	depends on IPV6
+	---help---
+	  Support for advanced routing by both source and destination address.
+
+	  If unsure, say N.
+
 source "net/ipv6/netfilter/Kconfig"
net/ipv6/ip6_fib.c +89 -42

228 lines not on this page · raw message

net/ipv6/ip6_output.c +51 -6

115 lines not on this page · raw message

net/ipv6/raw.c +3 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/raw.c merge-2.5/net/ipv6/raw.c
@@ -700,7 +700,9 @@
 done:
 	ip6_dst_store(sk, dst,
 		      !ipv6_addr_cmp(&fl.fl6_dst, &np->daddr) ?
-		      &np->daddr : NULL);
+		      &np->daddr : NULL,
+		      !ipv6_addr_cmp(&fl.fl6_src, &np->saddr) ?
+		      &np->saddr : NULL);
 	if (err > 0)
 		err = np->recverr ? net_xmit_errno(err) : 0;
 
net/ipv6/route.c +5 -6
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/route.c merge-2.5/net/ipv6/route.c
@@ -361,12 +361,8 @@
 		rt->u.dst.flags |= DST_HOST;
 
 #ifdef CONFIG_IPV6_SUBTREES
-		if (rt->rt6i_src.plen && saddr) {
-			ipv6_addr_copy(&rt->rt6i_src.addr, saddr);
-			rt->rt6i_src.plen = 128;
-		}
+		rt->rt6i_src.plen = ort->rt6i_src.plen;
 #endif
-
 		rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);
 
 		dst_hold(&rt->u.dst);
@@ -883,7 +879,7 @@
 	struct rt6_info *rt, *nrt;
 
 	/* Locate old route to this destination. */
-	rt = rt6_lookup(dest, NULL, neigh->dev->ifindex, 1);
+	rt = rt6_lookup(dest, saddr, neigh->dev->ifindex, 1);
 
 	if (rt == NULL)
 		return;
@@ -1050,6 +1046,9 @@
 		nrt = ip6_rt_copy(rt);
 		if (nrt == NULL)
 			goto out;
+#ifdef CONFIG_IPV6_SUBTREES
+		nrt->rt6i_src.plen = rt->rt6i_src.plen;
+#endif
 		ipv6_addr_copy(&nrt->rt6i_dst.addr, daddr);
 		nrt->rt6i_dst.plen = 128;
 		nrt->u.dst.flags |= DST_HOST;
net/ipv6/tcp_ipv6.c +27 -11
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/tcp_ipv6.c merge-2.5/net/ipv6/tcp_ipv6.c
@@ -563,10 +563,10 @@
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct tcp_opt *tp = tcp_sk(sk);
 	struct in6_addr *saddr = NULL;
-	struct in6_addr saddr_buf;
 	struct flowi fl;
 	struct dst_entry *dst;
 	int addr_type;
+	int reroute = 0;
 	int err;
 
 	if (addr_len < SIN6_LEN_RFC2133) 
@@ -685,24 +685,40 @@
 
 	dst = ip6_route_output(sk, &fl);
 
+#ifdef CONFIG_IPV6_SUBTREES
+	reroute = (saddr == NULL);
+#endif
 	if ((err = dst->error) != 0) {
 		dst_release(dst);
 		goto failure;
 	}
-
-	ip6_dst_store(sk, dst, NULL);
-	sk->route_caps = dst->dev->features&~(NETIF_F_IP_CSUM|NETIF_F_TSO);
-
+	if (!reroute) {
+		ip6_dst_store(sk, dst, NULL, NULL);
+		sk->route_caps = dst->dev->features&~(NETIF_F_IP_CSUM|NETIF_F_TSO);
+	}
 	if (saddr == NULL) {
-		err = ipv6_get_saddr(dst, &np->daddr, &saddr_buf);
+		err = ipv6_get_saddr(dst, &np->daddr, &fl.fl6_src);
+
+		if (reroute)
+			dst_release(dst);
 		if (err)
 			goto failure;
 
-		saddr = &saddr_buf;
+#ifdef CONFIG_IPV6_SUBTREES
+		dst = ip6_route_output(sk, &fl);
+
+		if ((err = dst->error) != 0) {
+			dst_release(dst);
+			goto failure;
+		}
+		ip6_dst_store(sk, dst, NULL, NULL);
+		sk->route_caps = dst->dev->features&~(NETIF_F_IP_CSUM|NETIF_F_TSO);
+#endif
+		saddr = &fl.fl6_src;
+		ipv6_addr_copy(&np->rcv_saddr, saddr);
 	}
 
 	/* set the source address */
-	ipv6_addr_copy(&np->rcv_saddr, saddr);
 	ipv6_addr_copy(&np->saddr, saddr);
 	inet->rcv_saddr = LOOPBACK4_IPV6;
 
@@ -1363,7 +1379,7 @@
 	atomic_inc(&inet6_sock_nr);
 #endif
 
-	ip6_dst_store(newsk, dst, NULL);
+	ip6_dst_store(newsk, dst, NULL, NULL);
 	sk->route_caps = dst->dev->features&~(NETIF_F_IP_CSUM|NETIF_F_TSO);
 
 	newtcp6sk = (struct tcp6_sock *)newsk;
@@ -1754,7 +1770,7 @@
 			return err;
 		}
 
-		ip6_dst_store(sk, dst, NULL);
+		ip6_dst_store(sk, dst, NULL, NULL);
 		sk->route_caps = dst->dev->features&~(NETIF_F_IP_CSUM|NETIF_F_TSO);
 	}
 
@@ -1795,7 +1811,7 @@
 			return -sk->err_soft;
 		}
 
-		ip6_dst_store(sk, dst, NULL);
+		ip6_dst_store(sk, dst, NULL, NULL);
 	}
 
 	skb->dst = dst_clone(dst);
net/ipv6/udp.c +26 -9
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/udp.c merge-2.5/net/ipv6/udp.c
@@ -254,12 +254,12 @@
 	struct inet_opt      	*inet = inet_sk(sk);
 	struct ipv6_pinfo      	*np = inet6_sk(sk);
 	struct in6_addr		*daddr;
-	struct in6_addr		saddr;
 	struct dst_entry	*dst;
 	struct flowi		fl;
 	struct ip6_flowlabel	*flowlabel = NULL;
 	int			addr_type;
 	int			err;
+	int			reroute = 0;
 
 	if (usin->sin6_family == AF_INET) {
 		if (__ipv6_only_sock(sk))
@@ -355,7 +355,6 @@
 
 	fl.proto = IPPROTO_UDP;
 	ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
-	ipv6_addr_copy(&fl.fl6_src, &saddr);
 	fl.oif = sk->bound_dev_if;
 	fl.fl_ip_dport = inet->dport;
 	fl.fl_ip_sport = inet->sport;
@@ -380,21 +379,37 @@
 		fl6_sock_release(flowlabel);
 		return err;
 	}
-
-	ip6_dst_store(sk, dst, &fl.fl6_dst);
-
+#if CONFIG_IPV6_SUBTREES
+	reroute = 1;
+#endif
 	/* get the source address used in the appropriate device */
 
-	err = ipv6_get_saddr(dst, daddr, &saddr);
+	err = ipv6_get_saddr(dst, daddr, &fl.fl6_src);
+
+	if (reroute)
+		dst_release(dst);
 
 	if (err == 0) {
+#ifdef CONFIG_IPV6_SUBTREES
+		if (reroute) {
+			dst = ip6_route_output(sk, &fl);
+			if ((err = dst->error) != 0) {
+				dst_release(dst);
+				fl6_sock_release(flowlabel);
+				return err; 
+			} 
+		}
+#endif
 		if (ipv6_addr_any(&np->saddr))
-			ipv6_addr_copy(&np->saddr, &saddr);
+			ipv6_addr_copy(&np->saddr, &fl.fl6_src);
 
 		if (ipv6_addr_any(&np->rcv_saddr)) {
-			ipv6_addr_copy(&np->rcv_saddr, &saddr);
+			ipv6_addr_copy(&np->rcv_saddr, &fl.fl6_src);
 			inet->rcv_saddr = LOOPBACK4_IPV6;
 		}
+		ip6_dst_store(sk, dst, &np->daddr, 
+			      !ipv6_addr_cmp(&fl.fl6_src, &np->saddr) ?
+			      &np->saddr : NULL);
 		sk->state = TCP_ESTABLISHED;
 	}
 	fl6_sock_release(flowlabel);
@@ -1003,7 +1018,9 @@
 
 	ip6_dst_store(sk, dst,
 		      !ipv6_addr_cmp(&fl.fl6_dst, &np->daddr) ?
-		      &np->daddr : NULL);
+		      &np->daddr : NULL,
+		      !ipv6_addr_cmp(&fl.fl6_src, &np->saddr) ?
+		      &np->saddr : NULL);
 	if (err > 0)
 		err = np->recverr ? net_xmit_errno(err) : 0;
 	release_sock(sk);
#2 lore raw

PATCH 1/1 : ipv6 tunnel for MIPv6

Hi again guys,

there was a while ago some talk about an xfrm6_tunnel driver IIRC. I don't know how far along the project is and what capabilities the xfrm6_tunnels will have, but in the mean time I have an ipv6-in-ipv6 tunnel driver specified in RFC 2473 to offer you. If the xfrm6_tunnels are going to support ipv6-in-ipv6 you also might find the code useful.

The tunnels are needed by MIPv6 for encapsulation and decapsulation of tunneled packets between the home agent and mobile node. Some proctocols like DHCP are also run over the virtual link between the MN and the home network according to the MIPv6 specification.

The patch is sent as an attachment to this mail, but is also available at:

http://www.mipl.mediapoli.com/patches/ip6-tunnel.patch

Regards,
Ville Nuorvala
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

include/linux/if_arp.h +1 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/if_arp.h merge-2.5/include/linux/if_arp.h
@@ -60,7 +60,7 @@
 #define ARPHRD_RAWHDLC	518		/* Raw HDLC			*/
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
-#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/
+#define ARPHRD_TUNNEL6	769		/* IP6IP6 tunnel       		*/
 #define ARPHRD_FRAD	770             /* Frame Relay Access Device    */
 #define ARPHRD_SKIP	771		/* SKIP vif			*/
 #define ARPHRD_LOOPBACK	772		/* Loopback device		*/
include/linux/ip6_tunnel.h +32 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/ip6_tunnel.h merge-2.5/include/linux/ip6_tunnel.h
@@ -0,0 +1,32 @@
+/*
+ * $Id$
+ */
+
+#ifndef _IP6_TUNNEL_H
+#define _IP6_TUNNEL_H
+
+#define IPV6_TLV_TNL_ENCAP_LIMIT 4
+#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
+
+/* don't add encapsulation limit if one isn't present in inner packet */
+#define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
+/* copy the traffic class field from the inner packet */
+#define IP6_TNL_F_USE_ORIG_TCLASS 0x2
+/* copy the flowlabel from the inner packet */
+#define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
+/* being used for Mobile IPv6 */
+#define IP6_TNL_F_MIP6_DEV 0x8
+
+struct ip6_tnl_parm {
+	char name[IFNAMSIZ];	/* name of tunnel device */
+	int link;		/* ifindex of underlying L2 interface */
+	__u8 proto;		/* tunnel protocol */
+	__u8 encap_limit;	/* encapsulation limit for tunnel */
+	__u8 hop_limit;		/* hop limit for tunnel */
+	__u32 flowinfo;		/* traffic class and flowlabel for tunnel */
+	__u32 flags;		/* tunnel flags */
+	struct in6_addr laddr;	/* local tunnel end-point address */
+	struct in6_addr raddr;	/* remote tunnel end-point address */
+};
+
+#endif
include/net/ip6_tunnel.h +44 -0

44 lines not on this page · raw message

net/ipv6/Kconfig +8 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Kconfig merge-2.5/net/ipv6/Kconfig
@@ -50,4 +50,12 @@
 
 	  If unsure, say N.
 
+config IPV6_TUNNEL
+	tristate "IPv6: IPv6-in-IPv6 tunnel"
+	depends on IPV6
+	---help---
+	  Support for IPv6-in-IPv6 tunnels described in RFC 2473.
+
+	  If unsure, say N.
+
 source "net/ipv6/netfilter/Kconfig"
net/ipv6/Makefile +2 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Makefile merge-2.5/net/ipv6/Makefile
@@ -15,3 +15,5 @@
 obj-$(CONFIG_INET6_ESP) += esp6.o
 obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o
 obj-$(CONFIG_NETFILTER)	+= netfilter/
+
+obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
net/ipv6/af_inet6.c +15 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/af_inet6.c merge-2.5/net/ipv6/af_inet6.c
@@ -57,6 +57,9 @@
 #include <net/transp_v6.h>
 #include <net/ip6_route.h>
 #include <net/addrconf.h>
+#if CONFIG_IPV6_TUNNEL
+#include <net/ip6_tunnel.h>
+#endif
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -780,6 +783,11 @@
 	err = ndisc_init(&inet6_family_ops);
 	if (err)
 		goto ndisc_fail;
+#ifdef CONFIG_IPV6_TUNNEL
+	err = ip6_tunnel_init();
+	if (err)
+		goto ip6_tunnel_fail;
+#endif
 	err = igmp6_init(&inet6_family_ops);
 	if (err)
 		goto igmp_fail;
@@ -834,6 +842,10 @@
 	igmp6_cleanup();
 #endif
 igmp_fail:
+#ifdef CONFIG_IPV6_TUNNEL
+	ip6_tunnel_cleanup();
+ip6_tunnel_fail:
+#endif
 	ndisc_cleanup();
 ndisc_fail:
 	icmpv6_cleanup();
@@ -869,6 +881,9 @@
 	ip6_route_cleanup();
 	ipv6_packet_cleanup();
 	igmp6_cleanup();
+#ifdef CONFIG_IPV6_TUNNEL
+	ip6_tunnel_cleanup();
+#endif
 	ndisc_cleanup();
 	icmpv6_cleanup();
 #ifdef CONFIG_SYSCTL
net/ipv6/ip6_tunnel.c +1268 -0

1,268 lines not on this page · raw message

net/ipv6/ipv6_syms.c +8 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/ipv6_syms.c merge-2.5/net/ipv6/ipv6_syms.c
@@ -38,3 +38,11 @@
 EXPORT_SYMBOL(ip6_found_nexthdr);
 EXPORT_SYMBOL(xfrm6_rcv);
 EXPORT_SYMBOL(xfrm6_clear_mutable_options);
+#ifdef CONFIG_IPV6_TUNNEL_MODULE
+EXPORT_SYMBOL(rt6_lookup);
+EXPORT_SYMBOL(fl6_sock_lookup);
+EXPORT_SYMBOL(ipv6_ext_hdr);
+EXPORT_SYMBOL(ip6_append_data);
+EXPORT_SYMBOL(ip6_flush_pending_frames);
+EXPORT_SYMBOL(ip6_push_pending_frames);
+#endif
net/netsyms.c +3 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/netsyms.c merge-2.5/net/netsyms.c
@@ -477,8 +477,10 @@
 EXPORT_SYMBOL(sysctl_max_syn_backlog);
 #endif
 
-EXPORT_SYMBOL(ip_generic_getfrag);
+#endif
 
+#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_IP_SCTP_MODULE) || defined (CONFIG_IPV6_TUNNEL_MODULE)
+EXPORT_SYMBOL(ip_generic_getfrag);
 #endif
 
 EXPORT_SYMBOL(tcp_read_sock);
#16 lore raw
In reply to Ville Nuorvala

In article <[email protected]> (at Fri, 30 May 2003 17:34:40 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 4 lines

here is a patch that fixes CONFIG_IPV6_SUBTREES and allows overriding normal routes with source address specific ones. This is for example needed in MIPv6 for handling the traffic to and from a mobile node's home address correctly.

Let us test the patch. It seemed buggy when USAGI tested before.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
#3 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to Ville Nuorvala

In article <[email protected]> (at Fri, 30 May 2003 18:00:55 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 5 lines

there was a while ago some talk about an xfrm6_tunnel driver IIRC. I don't know how far along the project is and what capabilities the xfrm6_tunnels will have, but in the mean time I have an ipv6-in-ipv6 tunnel driver specified in RFC 2473 to offer you. If the xfrm6_tunnels are going to support ipv6-in-ipv6 you also might find the code useful.

The code exists in our repository.
Kanda-san is preparing patch for xfrm6_tunnel;
patch will soon be available.

Quoted 4 lines

The tunnels are needed by MIPv6 for encapsulation and decapsulation of tunneled packets between the home agent and mobile node. Some proctocols like DHCP are also run over the virtual link between the MN and the home network according to the MIPv6 specification.

I'm not sure if MIP6 will use this tunnel driver.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
#17 lore raw
In reply to YOSHIFUJI Hideaki / 吉藤英明

When we have tested this recently (just two months ago), we found only two bugs but MIPL has already fixed those in their development version. How long before have you tested this and what problems have you encountered in your test?

Thanks,
Venkat

Quoted 15 lines · YOSHIFUJI Hideaki /

In article <[email protected]> (at Fri, 30 May 2003 17:34:40 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 6 lines

here is a patch that fixes CONFIG_IPV6_SUBTREES and allows overriding normal routes with source address specific ones. This is for example needed in MIPv6 for handling the traffic to and from a mobile node's home address correctly.

Let us test the patch. It seemed buggy when USAGI tested before.

#18 lore raw
In reply to YOSHIFUJI Hideaki / 吉藤英明
Quoted 1 line · On Sat, 31 May 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:

Let us test the patch. It seemed buggy when USAGI tested before.

Any feedback would have been (and still is) of course welcome. The bugs are much easier to locate and fix if people report about them :-)

-Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

#10 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to Ville Nuorvala

From: Ville Nuorvala <[email protected]>
Date: Fri, 30 May 2003 18:00:55 +0300 (EEST)

The patch is sent as an attachment to this mail, but is also available at:

You need to fix some things before I will apply this:

1) Bogus #ifdef CONFIG_IPV6_TUNNEL_MODULE. You need not this test around things like MODULE_AUTHOR() and stuff like that, linux/module.h does that for you.

2) Dependency upon subtrees patch, please remove it. There is no agreement on that semantic change to how subtrees work.

Thanks.

#4 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to YOSHIFUJI Hideaki / 吉藤英明

From: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Sat, 31 May 2003 00:38:58 +0900 (JST)

In article <[email protected]> (at Fri, 30 May 2003 18:00:55 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 4 lines

The tunnels are needed by MIPv6 for encapsulation and decapsulation of tunneled packets between the home agent and mobile node. Some proctocols like DHCP are also run over the virtual link between the MN and the home network according to the MIPv6 specification.

I'm not sure if MIP6 will use this tunnel driver.

Yes, it is an important issue.

I am VERY UPSET that there appears to be NO dialogue between USAGI and MIPV6 folks to discuss design of MIPV6. If you do not talk together, how can you guys possibly coordinate efforts and not avoid duplicated work?

And, it is very clear from my perspective that it is the MIPV6 developers who are not communicating. USAGI are making an effort to discuss the issues, but MIPV6 coders disappear for weeks at a time not answering queries made to them or comments made about their patch submissions.

That is unacceptable. And this makes me less likely to apply any patches from MIPV6 project, here is why. If some bug shows in some patch I apply from MIPV6 project, can I expect them to act similarly and not respond for weeks at a time? That's intolerable. If you add some bug to the tree, you are responsible to be responsive and fix the problem in a reasonable amount of time.

#11 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to David S. Miller
Quoted 6 lines · David S. Miller

You need to fix some things before I will apply this:

1) Bogus #ifdef CONFIG_IPV6_TUNNEL_MODULE. You need not this test around things like MODULE_AUTHOR() and stuff like that, linux/module.h does that for you.

Fixed.

Quoted 3 lines

2) Dependency upon subtrees patch, please remove it. There is no agreement on that semantic change to how subtrees work.

Done. I'll send a separate patch for the subtrees stuff if needed.

The revised version is attached to this mail, but also available at:
http://www.mipl.mediapoli.com/patches/ip6-tunnel-r2.patch

-Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

include/linux/if_arp.h +1 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/if_arp.h merge-2.5/include/linux/if_arp.h
@@ -60,7 +60,7 @@
 #define ARPHRD_RAWHDLC	518		/* Raw HDLC			*/
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
-#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/
+#define ARPHRD_TUNNEL6	769		/* IP6IP6 tunnel       		*/
 #define ARPHRD_FRAD	770             /* Frame Relay Access Device    */
 #define ARPHRD_SKIP	771		/* SKIP vif			*/
 #define ARPHRD_LOOPBACK	772		/* Loopback device		*/
include/linux/ip6_tunnel.h +32 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/ip6_tunnel.h merge-2.5/include/linux/ip6_tunnel.h
@@ -0,0 +1,32 @@
+/*
+ * $Id$
+ */
+
+#ifndef _IP6_TUNNEL_H
+#define _IP6_TUNNEL_H
+
+#define IPV6_TLV_TNL_ENCAP_LIMIT 4
+#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
+
+/* don't add encapsulation limit if one isn't present in inner packet */
+#define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
+/* copy the traffic class field from the inner packet */
+#define IP6_TNL_F_USE_ORIG_TCLASS 0x2
+/* copy the flowlabel from the inner packet */
+#define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
+/* being used for Mobile IPv6 */
+#define IP6_TNL_F_MIP6_DEV 0x8
+
+struct ip6_tnl_parm {
+	char name[IFNAMSIZ];	/* name of tunnel device */
+	int link;		/* ifindex of underlying L2 interface */
+	__u8 proto;		/* tunnel protocol */
+	__u8 encap_limit;	/* encapsulation limit for tunnel */
+	__u8 hop_limit;		/* hop limit for tunnel */
+	__u32 flowinfo;		/* traffic class and flowlabel for tunnel */
+	__u32 flags;		/* tunnel flags */
+	struct in6_addr laddr;	/* local tunnel end-point address */
+	struct in6_addr raddr;	/* remote tunnel end-point address */
+};
+
+#endif
include/net/ip6_tunnel.h +44 -0

44 lines not on this page · raw message

net/ipv6/Kconfig +8 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Kconfig merge-2.5/net/ipv6/Kconfig
@@ -42,4 +42,12 @@
 
 	  If unsure, say Y.
 
+config IPV6_TUNNEL
+	tristate "IPv6: IPv6-in-IPv6 tunnel"
+	depends on IPV6
+	---help---
+	  Support for IPv6-in-IPv6 tunnels described in RFC 2473.
+
+	  If unsure, say N.
+
 source "net/ipv6/netfilter/Kconfig"
net/ipv6/Makefile +2 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Makefile merge-2.5/net/ipv6/Makefile
@@ -15,3 +15,5 @@
 obj-$(CONFIG_INET6_ESP) += esp6.o
 obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o
 obj-$(CONFIG_NETFILTER)	+= netfilter/
+
+obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
net/ipv6/af_inet6.c +15 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/af_inet6.c merge-2.5/net/ipv6/af_inet6.c
@@ -57,6 +57,9 @@
 #include <net/transp_v6.h>
 #include <net/ip6_route.h>
 #include <net/addrconf.h>
+#if CONFIG_IPV6_TUNNEL
+#include <net/ip6_tunnel.h>
+#endif
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -780,6 +783,11 @@
 	err = ndisc_init(&inet6_family_ops);
 	if (err)
 		goto ndisc_fail;
+#ifdef CONFIG_IPV6_TUNNEL
+	err = ip6_tunnel_init();
+	if (err)
+		goto ip6_tunnel_fail;
+#endif
 	err = igmp6_init(&inet6_family_ops);
 	if (err)
 		goto igmp_fail;
@@ -834,6 +842,10 @@
 	igmp6_cleanup();
 #endif
 igmp_fail:
+#ifdef CONFIG_IPV6_TUNNEL
+	ip6_tunnel_cleanup();
+ip6_tunnel_fail:
+#endif
 	ndisc_cleanup();
 ndisc_fail:
 	icmpv6_cleanup();
@@ -869,6 +881,9 @@
 	ip6_route_cleanup();
 	ipv6_packet_cleanup();
 	igmp6_cleanup();
+#ifdef CONFIG_IPV6_TUNNEL
+	ip6_tunnel_cleanup();
+#endif
 	ndisc_cleanup();
 	icmpv6_cleanup();
 #ifdef CONFIG_SYSCTL
net/ipv6/ip6_tunnel.c +1261 -0

1,261 lines not on this page · raw message

net/ipv6/ipv6_syms.c +8 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/ipv6_syms.c merge-2.5/net/ipv6/ipv6_syms.c
@@ -38,3 +38,11 @@
 EXPORT_SYMBOL(ip6_found_nexthdr);
 EXPORT_SYMBOL(xfrm6_rcv);
 EXPORT_SYMBOL(xfrm6_clear_mutable_options);
+#ifdef CONFIG_IPV6_TUNNEL_MODULE
+EXPORT_SYMBOL(rt6_lookup);
+EXPORT_SYMBOL(fl6_sock_lookup);
+EXPORT_SYMBOL(ipv6_ext_hdr);
+EXPORT_SYMBOL(ip6_append_data);
+EXPORT_SYMBOL(ip6_flush_pending_frames);
+EXPORT_SYMBOL(ip6_push_pending_frames);
+#endif
net/netsyms.c +3 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/netsyms.c merge-2.5/net/netsyms.c
@@ -477,8 +477,10 @@
 EXPORT_SYMBOL(sysctl_max_syn_backlog);
 #endif
 
-EXPORT_SYMBOL(ip_generic_getfrag);
+#endif
 
+#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_IP_SCTP_MODULE) || defined (CONFIG_IPV6_TUNNEL_MODULE)
+EXPORT_SYMBOL(ip_generic_getfrag);
 #endif
 
 EXPORT_SYMBOL(tcp_read_sock);
#5 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to David S. Miller
Quoted 4 lines · David S. Miller

I am VERY UPSET that there appears to be NO dialogue between USAGI and MIPV6 folks to discuss design of MIPV6. If you do not talk together, how can you guys possibly coordinate efforts and not avoid duplicated work?

I am sorry about the long delay in the extension header addition mechanism discussion. The issues involved with interactions between xfrm stacked destinations and mipv6 were at least to me somewhat fuzzy. To understand them better we developed a prototype of the mipv6 extension header addition and processing. This unfortunately took too long, due to other work.

In any case, I hope we can all work better together from now on. In hopes of starting a working dialogue, I'll try to summarize the current situation on our side.

1. Tunnel

The tunneling code should be ready, Ville just sent a patch without dependancies on source address based routing. All received and future comments about that are highly appreciated.

2. Source address based routing

Ville sent the patch. The semantical changes to the original code were in our opinion necessary to get source address based routing working more as IPv4 policy routing. Let's discuss this more.

3. API

We've added kernel support for the API to accept routing header type 2 and to do the additional checks necessary. Also home address option API support has been written. In fact, you can add any destination option to the new DO position with this.

There is a (sub)group working on MIPv6 extensions to the Advanced Socket API for IPv6. To me it seems pointless to add anything other to the spec than a way to insert a destination option header to the third possible DO position (i.e. between routing header and fragmentation header). This could be done just by adding new type, let's call it IPV6_NOFRAGDSTOPTS. Everything else should be doable with the existing ASA. We would like to hear comments on this.

Is a rtnetlink extension enough for adding mobility routes or do we need to support ioctl too?

4. Source address selection

We think adding new home address flag to addresses is the best and easiest way making the source address selection to work with MIPv6. I'm sure USAGI will add the relevant checks to their source address selection code for that. Dave, Antti already brought this up some weeks ago, but got no answer. Is the home address bit OK with you?

5. MIPv6 extension header adding

We have been also testing how the mipv6 extension header adding would work in practice through the development of a prototype for the purpose. Based on the work it seems (to me) that the use of xfrm for storing the mipv6 stuff conflicts with its primary use, especially if there are overlapping entries for IPSec and MIPv6.

Storing of the mipv6 information would in our opinion be achieved more cleanly by using cached routes which included the mipv6 information (two extra addresses and flags). The routes would contain modified nexthop information and mip6_output as the rt->u.dst.output function. Mip6_output would add the extension headers based on the information stored in the route. The routes would have a stacked dst entry, which would be used for actual output.

Our prototype currently works with tcp, tcp + ipsec and raw sockets, but has only a hackish interface through route ioctl for testing. I can send a preview patch of the code for discussion, if the general approach makes sense to you. I would like to hear your opinions on this and also if you (USAGI) have planned something else for storing the mipv6 state.

Henrik

#6 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

Hello.

In article <[email protected]> (at Wed, 04 Jun 2003 17:30:30 +0300), Henrik Petander <[email protected]> says:

Quoted 5 lines

2. Source address based routing

Ville sent the patch. The semantical changes to the original code were in our opinion necessary to get source address based routing working more as IPv4 policy routing. Let's discuss this more.

I'm not sure why you need this (and tunnel) for MIP... Would you clearify for me?
(IMHO, I believe we don't need this change if we use XFRM engine.)

BTW, source based routing (source address is major, destination is minor) is done by policy routing; It is NOT the task of CONFIG_IPV6_SUBTREE, IMHO. Yes, poeple want to have policy routing, but it is NOT (only) for MIP6.

Quoted 1 line

3. API

:

Quoted 7 lines

There is a (sub)group working on MIPv6 extensions to the Advanced Socket API for IPv6. To me it seems pointless to add anything other to the spec than a way to insert a destination option header to the third possible DO position (i.e. between routing header and fragmentation header). This could be done just by adding new type, let's call it IPV6_NOFRAGDSTOPTS. Everything else should be doable with the existing ASA. We would like to hear comments on this.

No, user daemon adds a XFRM policy for adding destination option (and/or routing header). Stackable destination will do the real work. (So, we don't need socket options.)

Quoted 7 lines

4. Source address selection

We think adding new home address flag to addresses is the best and easiest way making the source address selection to work with MIPv6. I'm sure USAGI will add the relevant checks to their source address selection code for that. Dave, Antti already brought this up some weeks ago, but got no answer. Is the home address bit OK with you?

"Yes," is my answer for now.

Quoted 1 line

5. MIPv6 extension header adding

:

Quoted 7 lines

Storing of the mipv6 information would in our opinion be achieved more cleanly by using cached routes which included the mipv6 information (two extra addresses and flags). The routes would contain modified nexthop information and mip6_output as the rt->u.dst.output function. Mip6_output would add the extension headers based on the information stored in the route. The routes would have a stacked dst entry, which would be used for actual output.

I still belive it is very natural to use XFRM to manage stackable destination.

Quoted 5 lines

Our prototype currently works with tcp, tcp + ipsec and raw sockets, but has only a hackish interface through route ioctl for testing. I can send a preview patch of the code for discussion, if the general approach makes sense to you. I would like to hear your opinions on this and also if you (USAGI) have planned something else for storing the mipv6 state.

Okay, anyway, please sent it to David, Alexey and me (at least). We can learn more from the code than documentation. ;-)

Thank you.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
#7 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

Hello Yoshifuji,

Quoted 7 lines · On Thu, 5 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:

In article <[email protected]> (at Wed, 04 Jun 2003 17:30:30 +0300), Henrik Petander <[email protected]> says:

Quoted 1 line

2. Source address based routing

I'm not sure why you need this (and tunnel) for MIP... Would you clearify for me?
(IMHO, I believe we don't need this change if we use XFRM engine.)

As far as I remember there are three main reasons for this: (Ville correct me if forgot something)

1. Mobile node sends packets to correspondent node through the tunnel, if they have home address as the IPv6 source address (not in home address option). MIPv6 signalling packets are sent at the same time with the home address option (i.e. care-of address as the source address in IPv6 header) to the same destination, but they must not be sent through the tunnel. If the xfrm engine works correctly (for IPSec) and does the lookup using the home address as the source address, the flows appear the same based on the addresses.

2. Home Agent delivers packets with its own address as source address to mobile node using route optimization, i.e. routing header type 2, but tunnels other traffic to MN. Again behaviour depends on the source address.

3. Multihomed mobile hosts: Mobile nodes can have a cellular and WLAN interface. Packets with address from one interface can be sent only through that interface to avoid RPF dropping the traffic. With routing based primarily on source addresses this is easy to achieve. Actually this is more general than MIPv6, but multihoming is essential for real-life mobility.

Quoted 4 lines

BTW, source based routing (source address is major, destination is minor) is done by policy routing; It is NOT the task of CONFIG_IPV6_SUBTREE, IMHO. Yes, poeple want to have policy routing, but it is NOT (only) for MIP6.

IMO source address subtrees were useless as they were at least for doing mobility and multihoming, whereas with source address as primary selector routing for mobile and multihomed hosts is straightforward. Of course I may miss something of the larger picture ;-) But so far I have heard of no one using them for anything else. As long as Linux lacks "real" IPv6 policy routing, source based routing is the best we have got and works both for mobility and multihoming. The main problem with it is IMO the source address selection using the route as a selection basis. Just my thoughts, though.

Quoted 6 lines
Quoted 2 lines

3. API

No, user daemon adds a XFRM policy for adding destination option (and/or routing header). Stackable destination will do the real work. (So, we don't need socket options.)

Actually we do... Due to some interesting requirements in the MIPv6 spec. the signalling packets are treated differently from data packets: home address option is always present in binding update messages, but it can be used with data packets only after sending a binding update. Routing header type 2 is used in negative binding acks sometimes with addresses which differ from the ones used with data packets.

The signalling packets need IPSec protection with final addresses as selectors, so the MIPv6 extension headers can't be added to packets created by a raw socket as the final addresses would be hidden in the extension headers.

Quoted 4 lines
Quoted 2 lines

5. MIPv6 extension header adding

I still belive it is very natural to use XFRM to manage stackable destination.

If you have a concrete proposal how to do it, I would be eager to hear it ;-)

Quoted 2 lines

Okay, anyway, please sent it to David, Alexey and me (at least). We can learn more from the code than documentation. ;-)

Sure, I'll send it tomorrow when i get back to work.

Regards,

Henrik

		----------------------------------
		Henrik Petander
		Helsinki University of Technology,
		GO/Core Project
		[email protected]
		Office: +358 (0)9 451 5846
		GSM: +358 (0)40 741 5248
		----------------------------------
#8 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

Quoted 5 lines · Henrik Petander

Hello Yoshifuji,

Quoted 2 lines · On Thu, 5 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:

In article <[email protected]> (at Wed, 04 Jun 2003 17:30:30 +0300), Henrik Petander <[email protected]> says:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

2. Source address based routing

I'm not sure why you need this (and tunnel) for MIP... Would you clearify for me?
(IMHO, I believe we don't need this change if we use XFRM engine.)

As far as I remember there are three main reasons for this: (Ville correct me if forgot something)

I think you've got all the main reasons. I'll get back to this issue if I suddenly remember something you forgot. :)

-Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

#19 lore raw
In reply to YOSHIFUJI Hideaki / 吉藤英明

In article <[email protected]> (at Sat, 31 May 2003 00:03:19 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <[email protected]> says:

Quoted 8 lines

In article <[email protected]> (at Fri, 30 May 2003 17:34:40 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 4 lines

here is a patch that fixes CONFIG_IPV6_SUBTREES and allows overriding normal routes with source address specific ones. This is for example needed in MIPv6 for handling the traffic to and from a mobile node's home address correctly.

Let us test the patch. It seemed buggy when USAGI tested before.

I've re-tested your latest CONFIG_IPV6_SUBTREE patch. The results of the restesting seems fine. However, I won't accept your patch as-is for now.

The patch consists of several parts:

1. fixing bugs in IPv6 code
2. fixing bugs in CONFIG_IPV6_SUBTREE code
3. changing majority of keys of routing table.

There's no problems with 1 and 2.
However, We need to discuss on 3.

As I said in other thread, the policy routing should be done in the other way. And, it is not good to change the semantics of CONFIG_IPV6_SUBTREE.

In original, routing is looked up by destination address, and then, looked up by the source address; destination takes precedence over source. Your patch changes this. Source address takes precedence over destination address.

Quoted 1 line

From the point of the policy routing, both (and other attributes) should be

considered equally, and this is what IPv4 routing table does.

Well, I won't hurry intorducing IPv6 policy routing just because of MIP6. The reason why I won't hurry is because I still believe it is not required for MIP6. Nakamura, one of our member, will describe the details. It takes precedence over "limited" policy(?) routing to introcuce generic policy routing.

Anyway, will you split up your patch (into 1-3 above) first, please?

Thanks.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
#9 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to YOSHIFUJI Hideaki / 吉藤英明
Quoted 8 lines · On Thu, 5 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:

In article <[email protected]> (at Wed, 04 Jun 2003 17:30:30 +0300), Henrik Petander <[email protected]> says:

Quoted 1 line

2. Source address based routing

I'm not sure why you need this (and tunnel) for MIP... Would you clearify for me?
(IMHO, I believe we don't need this change if we use XFRM engine.)

A few comments about the tunnels:

Can you run link-scope protocols over an XFRM tunnel? The MIPv6 spec more or less requires this feature if you are to support protocols like DHCPv6 and MLD. (See eg. sections 8.5, 10.4.3 and 10.4.4 in the MIPv6 draft 22).

The only way to get them to work is AFAICS that there is a virtual net_device associated with every tunnel. Are XFRM tunnels like this?

At least they didn't seem to be, based on the xfrm6_tunnel patch sent to netdev last week...

If the tunnels aren't separate devices I can straight away think of one scenario where we run into trouble.

1. MN receives RA with M or O flags set from a router on the foreign link.

2. MN receives a MPA with M or O flags set from HA.

In the first case the DHCP queries should be sent to the current link the MN is attached to, in the latter to the HA.

I dont see any way for the MN to separate these two cases while sending the DHCP queries, _unless_ they are sent through different interfaces (i.e. the physical vs the virtual tunnel interface).

On a more general note, the driver I sent aims to provide provide a completely RFC 2473 compliant tunnel interface. :)

Things (at the moment) missing from the xfrm6_tunnel are at least:
- tunnel encapsulation limit destination sub-option support
- forwarding of ICMP errors to the original source of the packet
- transparent fragmentation of packets if MTU minus size of tunnel headers less than IPV6_MIN_MTU
- ability to configure things like traffic class and flowlabel of encapsulating ipv6 header

Perhaps we could make feature complete ip6ip6 tunnels if we combined xfrm6_tunnel and ip6_tunnel? :)

Regards,
Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

#20 lore raw
In reply to YOSHIFUJI Hideaki / 吉藤英明

Hello,
I'm Nakamura, a member of USAGI.

Quoted 5 lines · On Thu, 05 Jun 2003 19:12:24 +0900 (JST) YOSHIFUJI Hideaki / 吉藤英明…

Well, I won't hurry intorducing IPv6 policy routing just because of MIP6. The reason why I won't hurry is because I still believe it is not required for MIP6. Nakamura, one of our member, will describe the details. It takes precedence over "limited" policy(?) routing to introcuce generic policy routing.

As you know, we've been planning the MIPv6 design to use XFRM.
If we use MIPv6, we need some fix and extension to XFRM and it results to make XFRM more generic.

On output processing, our design is like below:

Through netlink/xfrm from userland, we have to set xfrm_policy and xfrm_state with something like ip command(or extended ip command).

The xfrm_policy has two templates now:
- template handling Routing Header type 2(RT2) ...(a)
- template handling Destination Options Header(DST) ...(b)

And we have to add one address field(c) in xfrm_state for MIPv6. (Currently it is named mip6_state.addr.)

Template-(a) finds a xfrm_state that points function like mip6_rthdr_output() to insert RT2 and replace dst address of IP header with specified address-(c).

Also, template-(b) finds a xfrm_state that points function like mip6_destopt_output() to insert DST and replace src address of IP header with specified address-(c).

Of course, both mip6_rthdr_output() and mip6_destopt_output() are callled as dst_output in XFRM world internally.

For example, if two state is found, the packet will be append both RT2 and DST. We have tested that on our tree.

In case of tunneling, We think we also make it to add a template and prepare a function for dst_output on XFRM world like above. (Maybe xfrm6_tunnel needs some fix to use MIPv6, as Henrik said.)

Could you give us comments?

BTW, I have read Henrik's patch(mip6-exthdr.patch) sent to netdev in other thread and I feel that is simple code to implement MIPv6 and is clean one. Thanks, Henrik. As he said, it is similar one to use XFRM like ours.
We know that the big difference between yours and ours is to modify either routing table or XFRM.

Anyway, we'll show you our patch later.

Regards,

Signature · 1 line
Masahide NAKAMURA
#35 lore raw
In reply to YOSHIFUJI Hideaki / 吉藤英明
Quoted 9 lines · On Thu, 5 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:

In article <[email protected]> (at Sat, 31 May 2003 00:03:19 +0900 (JST)), YOSHIFUJI Hideaki / $B5HF#1QL@(B <[email protected]> says:

Quoted 7 lines

In article <[email protected]> (at Fri, 30 May 2003 17:34:40 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 4 lines

here is a patch that fixes CONFIG_IPV6_SUBTREES and allows overriding normal routes with source address specific ones. This is for example needed in MIPv6 for handling the traffic to and from a mobile node's home address correctly.

Quoted 4 lines
Quoted 1 line

Let us test the patch. It seemed buggy when USAGI tested before.

I've re-tested your latest CONFIG_IPV6_SUBTREE patch. The results of the restesting seems fine.

Great! :)

Quoted 10 lines

However, I won't accept your patch as-is for now.

The patch consists of several parts:

1. fixing bugs in IPv6 code
2. fixing bugs in CONFIG_IPV6_SUBTREE code
3. changing majority of keys of routing table.

There's no problems with 1 and 2.
However, We need to discuss on 3.

I have of course no objections against 1. :)

However 2 and 3 are in my view quite interrelated.

Quoted 3 lines

As I said in other thread, the policy routing should be done in the other way. And, it is not good to change the semantics of CONFIG_IPV6_SUBTREE.

Even if the semantics are flawed? I'll try to explain my reasoning below.

Quoted 4 lines

In original, routing is looked up by destination address, and then, looked up by the source address; destination takes precedence over source. Your patch changes this. Source address takes precedence over destination address.

The main problem with the original destination,source lookup are the cached host routes created by ip6_route_{input,output} (or actually rt6_cow).

Since these routes have destination prefix length 128, they will override all source routes, unless they also are host routes.

This happens because the (non-host) source route ends up in the subtree of a node higher up in the destination tree, which will never be reached because the cached host route already matches the destination address.

Since the initial mode of communication between a mobile node (using its home address) and any correspondent node is reverse tunneling we at least need something like a default (i.e. a non-host) route through the tunnel for the MN's home address.

Not until route optimization is set up between the MN and the CN do we actually get host routes for the traffic between the two.

If we switch the order of keys to source,destination we don't get this problem since the cached host routes end up at the bottom of the subtrees and wont interfere with the normal routing.

Prefix routes also cause problems with the destination,source key order, since we must create a duplicate route for each prefix and home address.

Hope I explained it clearly enough :)

Quoted 2 lines

From the point of the policy routing, both (and other attributes) should be considered equally, and this is what IPv4 routing table does.

This of course seems like the optimal solution.

Quoted 5 lines

Well, I won't hurry intorducing IPv6 policy routing just because of MIP6. The reason why I won't hurry is because I still believe it is not required for MIP6. Nakamura, one of our member, will describe the details. It takes precedence over "limited" policy(?) routing to introcuce generic policy routing.

I still think _some_ routing changes are necessary, but I guess we need to discuss what the changes are. I'm btw willing to help with the IPv6 policy routing if that helps getting it into the kernel sooner.

Quoted 1 line

Anyway, will you split up your patch (into 1-3 above) first, please?

I'll check if there still is anything to do in 1 after the patch you already submitted, but let's please discuss 3 before I split it into 2 and 3.

Thanks,
Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

#36 lore raw

Re: CONFIG_IPV6_SUBTREES (was [patch]: CONFIG_IPV6_SUBTREES fix for MIPv6)

In article <[email protected]> (at Fri, 6 Jun 2003 11:48:36 +0300 (EEST)), Ville Nuorvala <[email protected]> says:

Quoted 4 lines

Since the initial mode of communication between a mobile node (using its home address) and any correspondent node is reverse tunneling we at least need something like a default (i.e. a non-host) route through the tunnel for the MN's home address.

Excuse me, please forget anything related to "Mobile IP" during this discussion; do not assume that Mobile IP is the only user of CONFIG_IPV6_SUBTREES.

Thank you.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
#21 lore raw
In reply to Masahide NAKAMURA

Hello Nakamura,

Quoted 7 lines · Masahide NAKAMURA

Hello,
I'm Nakamura, a member of USAGI.

As you know, we've been planning the MIPv6 design to use XFRM.
If we use MIPv6, we need some fix and extension to XFRM and it results to make XFRM more generic.

I like your idea, as it allows a high level of flexibility in use of mipv6 with flows through the definition of policies. This is the way I would also do mipv6 extension header addition with xfrm.

However, if you insert mipv6 policies into xfrm, you need to take care of the interactions between ipsec and mipv6 policies. The system needs to cope with data flows to which both ipsec and mipv6 should be applied. As a result of this the logic of the xfrm lookups probably needs some changes to return both the matching ipsec and mipv6 policies. How have you planned to solve this problem?

BTW, feel free to use relevant parts of my code for the output functionality to speed up the work. After your code is ready we can look at which approach is better suited for implementing the kernel support and get a working kernel infrastructure for mipv6 into 2.6 kernels.

Henrik

#37 lore raw

Re: CONFIG_IPV6_SUBTREES (was [patch]: CONFIG_IPV6_SUBTREES fix for MIPv6)

In reply to YOSHIFUJI Hideaki / 吉藤英明
Quoted 3 lines · On Fri, 6 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:

Excuse me, please forget anything related to "Mobile IP" during this discussion; do not assume that Mobile IP is the only user of CONFIG_IPV6_SUBTREES.

At the moment it is :)

I was just making a point about the IMHO flawed semantics of CONFIG_IPV6_SUBTREES.

If you keep the original (first dest, then src) key ordering you basically can't use the subtrees for anything else but storing source address specific host routes.

With the reversed order you can do a lot more...

-Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

#22 lore raw
In reply to Henrik Petander

Hello Henrik,

Quoted 3 lines · On Fri, 06 Jun 2003 14:14:35 +0300 Henrik Petander <[email protected]> wrote:

I like your idea, as it allows a high level of flexibility in use of mipv6 with flows through the definition of policies. This is the way I would also do mipv6 extension header addition with xfrm.

Thanks.

Quoted 6 lines

However, if you insert mipv6 policies into xfrm, you need to take care of the interactions between ipsec and mipv6 policies. The system needs to cope with data flows to which both ipsec and mipv6 should be applied. As a result of this the logic of the xfrm lookups probably needs some changes to return both the matching ipsec and mipv6 policies. How have you planned to solve this problem?

We don't think we have to change the logic handling policy with the reason because we can treat MIPv6 policy just like IPsec.

When we want to apply both MIPv6 and IPsec to the same target, we need one policy that has two or more of templates(e.g. one is MIPv6's template and the other is IPsec's).

Regarding above case, however, we have a problem like below:

draft(9.3.1 in draft-ietf-mobileip-ipv6-22) says,

When attempting to verify AH authentication data in a packet that contains a Home Address option, the receiving node MUST calculate the AH authentication data as if the following were true: The Home Address option contains the care-of address, and the source IPv6 address field of the IPv6 header contains the home address.

Because xfrm decides to call dst_output in the order of templates, at first we had no idea which is the former template, MIPv6 or IPsec(Home Address Option or AH).

Then we discussed about that with our IPsec guys and now we guess we have an idea to use xfrm6_clear_mutable_options() to re-replace address for calculating for AH when calling ah6_output().

Anyway, I think this is not specialized matter of xfrm. (Did you also point this, Henrik?) Or, could you have any idea?

Quoted 4 lines

BTW, feel free to use relevant parts of my code for the output functionality to speed up the work. After your code is ready we can look at which approach is better suited for implementing the kernel support and get a working kernel infrastructure for mipv6 into 2.6 kernels.

Thank you for your kindness. Of course I agree with you.

Regards,

Signature · 1 line
Masahide NAKAMURA
#12 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In reply to Ville Nuorvala

From: Ville Nuorvala <[email protected]>
Date: Wed, 4 Jun 2003 15:40:02 +0300 (EEST)

The revised version is attached to this mail,

Looks ok, but sorry two things need to be fixed up first:

1) Doesn't apply anymore, I think it's because of the struct sock member renames, just replace sk->foo with sk->sk_foo

2) Just export all those routines from net/ipv6/ipv6_syms.c always, remove the ifdefs.

I promise to apply it after you fix this stuff up :)))

Thank you.

#13 lore raw

Re: [patch]: ipv6 tunnel for MIPv6

In article <[email protected]> (at Sat, 07 Jun 2003 03:30:59 -0700 (PDT)), "David S. Miller" <[email protected]> says:

Quoted 1 line

I promise to apply it after you fix this stuff up :)))

Please be sure not to include "for MIPv6" from the changeset. :-)

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
#23 lore raw
In reply to Masahide NAKAMURA
Quoted 7 lines · Masahide NAKAMURA

We don't think we have to change the logic handling policy with the reason because we can treat MIPv6 policy just like IPsec.

When we want to apply both MIPv6 and IPsec to the same target, we need one policy that has two or more of templates(e.g. one is MIPv6's template and the other is IPsec's).

Does this also mean that the IPSec and MIPv6 policies and SAs need to be configured at the same time or is it possible to add templates to an existing policy?

Quoted 10 lines

Regarding above case, however, we have a problem like below:

draft(9.3.1 in draft-ietf-mobileip-ipv6-22) says,

When attempting to verify AH authentication data in a packet that contains a Home Address option, the receiving node MUST calculate the AH authentication data as if the following were true: The Home Address option contains the care-of address, and the source IPv6 address field of the IPv6 header contains the home address.

Yes, and this also applies to routing header types 0 and 2. They also need to be processed by AH so that the addresses are as the receiver sees them after processing the headers: home address in destination address and care-of address in the routing header. This is just not said in the mipv6 spec as the routing header IPSec interactions are not specified by it.

Quoted 4 lines

Because xfrm decides to call dst_output in the order of templates, at first we had no idea which is the former template, MIPv6 or IPsec(Home Address Option or AH).

MIPv6 headers should be added first for AH to work.

A different issue related to the different addresses is that the SPD lookup should be done with the original source address, i.e. home address, if home address option is used and with the final destination address, if routing header is used. SPD lookup works now for TCP (with RT header), but not for raw sockets, which the mipv6 daemon will use. We will provide a patch for fixing the SPD lookups with raw sockets, which add routing header and home address option from socket options.

Henrik

		----------------------------------
		Henrik Petander
		Helsinki University of Technology,
		GO/Core Project
		[email protected]
		Office: +358 (0)9 451 5846
		GSM: +358 (0)40 741 5248
		----------------------------------
#24 lore raw
Quoted 5 lines · On Mon, 9 Jun 2003 12:06:35 +0300 (EEST) Henrik Petander…
Quoted 4 lines · Masahide NAKAMURA

We don't think we have to change the logic handling policy with the reason because we can treat MIPv6 policy just like IPsec.

Quoted 7 lines
Quoted 3 lines

When we want to apply both MIPv6 and IPsec to the same target, we need one policy that has two or more of templates(e.g. one is MIPv6's template and the other is IPsec's).

Does this also mean that the IPSec and MIPv6 policies and SAs need to be configured at the same time or is it possible to add templates to an existing policy?

Currently no interface to add templates directly to it.

:

Quoted 8 lines

A different issue related to the different addresses is that the SPD lookup should be done with the original source address, i.e. home address, if home address option is used and with the final destination address, if routing header is used. SPD lookup works now for TCP (with RT header), but not for raw sockets, which the mipv6 daemon will use. We will provide a patch for fixing the SPD lookups with raw sockets, which add routing header and home address option from socket options.

Ok, I want to see your patch when it is provided because now I'm not so clear about using socket option in the above case.

Regards,

Signature · 1 line
Masahide NAKAMURA
#14 lore raw

ipv6 tunnel patch (was: Re: [patch]: ipv6 tunnel for MIPv6)

In reply to David S. Miller
Quoted 6 lines · David S. Miller

Looks ok, but sorry two things need to be fixed up first:

1) Doesn't apply anymore, I think it's because of the struct sock member renames, just replace sk->foo with sk->sk_foo

Done...

Quoted 2 lines

2) Just export all those routines from net/ipv6/ipv6_syms.c always, remove the ifdefs.

...and done!

Quoted 2 lines

I promise to apply it after you fix this stuff up :)))

Ok here's the last revision of the patch :)

It's done against ChangeSet 1.1308.

Also available at:
http://www.mipl.mediapoli.com/patches/ip6-tunnel-r3.patch

Thanks!

-Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications, Helsinki University of Technology
email: [email protected], phone: +358 (0)9 451 5257

include/linux/if_arp.h +1 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/if_arp.h merge-2.5/include/linux/if_arp.h
@@ -60,7 +60,7 @@
 #define ARPHRD_RAWHDLC	518		/* Raw HDLC			*/
 
 #define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
-#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/
+#define ARPHRD_TUNNEL6	769		/* IP6IP6 tunnel       		*/
 #define ARPHRD_FRAD	770             /* Frame Relay Access Device    */
 #define ARPHRD_SKIP	771		/* SKIP vif			*/
 #define ARPHRD_LOOPBACK	772		/* Loopback device		*/
include/linux/ip6_tunnel.h +32 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/include/linux/ip6_tunnel.h merge-2.5/include/linux/ip6_tunnel.h
@@ -0,0 +1,32 @@
+/*
+ * $Id$
+ */
+
+#ifndef _IP6_TUNNEL_H
+#define _IP6_TUNNEL_H
+
+#define IPV6_TLV_TNL_ENCAP_LIMIT 4
+#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
+
+/* don't add encapsulation limit if one isn't present in inner packet */
+#define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
+/* copy the traffic class field from the inner packet */
+#define IP6_TNL_F_USE_ORIG_TCLASS 0x2
+/* copy the flowlabel from the inner packet */
+#define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
+/* being used for Mobile IPv6 */
+#define IP6_TNL_F_MIP6_DEV 0x8
+
+struct ip6_tnl_parm {
+	char name[IFNAMSIZ];	/* name of tunnel device */
+	int link;		/* ifindex of underlying L2 interface */
+	__u8 proto;		/* tunnel protocol */
+	__u8 encap_limit;	/* encapsulation limit for tunnel */
+	__u8 hop_limit;		/* hop limit for tunnel */
+	__u32 flowinfo;		/* traffic class and flowlabel for tunnel */
+	__u32 flags;		/* tunnel flags */
+	struct in6_addr laddr;	/* local tunnel end-point address */
+	struct in6_addr raddr;	/* remote tunnel end-point address */
+};
+
+#endif
include/net/ip6_tunnel.h +44 -0

44 lines not on this page · raw message

net/ipv6/Kconfig +8 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Kconfig merge-2.5/net/ipv6/Kconfig
@@ -55,4 +55,12 @@
 
 	  If unsure, say Y.
 
+config IPV6_TUNNEL
+	tristate "IPv6: IPv6-in-IPv6 tunnel"
+	depends on IPV6
+	---help---
+	  Support for IPv6-in-IPv6 tunnels described in RFC 2473.
+
+	  If unsure, say N.
+
 source "net/ipv6/netfilter/Kconfig"
net/ipv6/Makefile +2 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/Makefile merge-2.5/net/ipv6/Makefile
@@ -15,3 +15,5 @@
 obj-$(CONFIG_INET6_ESP) += esp6.o
 obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o
 obj-$(CONFIG_NETFILTER)	+= netfilter/
+
+obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
net/ipv6/af_inet6.c +15 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/af_inet6.c merge-2.5/net/ipv6/af_inet6.c
@@ -57,6 +57,9 @@
 #include <net/transp_v6.h>
 #include <net/ip6_route.h>
 #include <net/addrconf.h>
+#if CONFIG_IPV6_TUNNEL
+#include <net/ip6_tunnel.h>
+#endif
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -776,6 +779,11 @@
 	err = ndisc_init(&inet6_family_ops);
 	if (err)
 		goto ndisc_fail;
+#ifdef CONFIG_IPV6_TUNNEL
+	err = ip6_tunnel_init();
+	if (err)
+		goto ip6_tunnel_fail;
+#endif
 	err = igmp6_init(&inet6_family_ops);
 	if (err)
 		goto igmp_fail;
@@ -830,6 +838,10 @@
 	igmp6_cleanup();
 #endif
 igmp_fail:
+#ifdef CONFIG_IPV6_TUNNEL
+	ip6_tunnel_cleanup();
+ip6_tunnel_fail:
+#endif
 	ndisc_cleanup();
 ndisc_fail:
 	icmpv6_cleanup();
@@ -865,6 +877,9 @@
 	ip6_route_cleanup();
 	ipv6_packet_cleanup();
 	igmp6_cleanup();
+#ifdef CONFIG_IPV6_TUNNEL
+	ip6_tunnel_cleanup();
+#endif
 	ndisc_cleanup();
 	icmpv6_cleanup();
 #ifdef CONFIG_SYSCTL
net/ipv6/ip6_tunnel.c +1261 -0

1,261 lines not on this page · raw message

net/ipv6/ipv6_syms.c +6 -0
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/ipv6/ipv6_syms.c merge-2.5/net/ipv6/ipv6_syms.c
@@ -38,3 +38,9 @@
 EXPORT_SYMBOL(ip6_find_1stfragopt);
 EXPORT_SYMBOL(xfrm6_rcv);
 EXPORT_SYMBOL(xfrm6_clear_mutable_options);
+EXPORT_SYMBOL(rt6_lookup);
+EXPORT_SYMBOL(fl6_sock_lookup);
+EXPORT_SYMBOL(ipv6_ext_hdr);
+EXPORT_SYMBOL(ip6_append_data);
+EXPORT_SYMBOL(ip6_flush_pending_frames);
+EXPORT_SYMBOL(ip6_push_pending_frames);
net/netsyms.c +3 -1
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5/net/netsyms.c merge-2.5/net/netsyms.c
@@ -477,8 +477,10 @@
 EXPORT_SYMBOL(sysctl_max_syn_backlog);
 #endif
 
-EXPORT_SYMBOL(ip_generic_getfrag);
+#endif
 
+#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_IP_SCTP_MODULE) || defined (CONFIG_IPV6_TUNNEL_MODULE)
+EXPORT_SYMBOL(ip_generic_getfrag);
 #endif
 
 EXPORT_SYMBOL(tcp_read_sock);
#15 lore raw

Re: ipv6 tunnel patch

From: Ville Nuorvala <[email protected]>
Date: Mon, 9 Jun 2003 14:43:11 +0300 (EEST)

Ok here's the last revision of the patch :)

It's done against ChangeSet 1.1308.

Applied, thank you.

#25 lore raw
In reply to Masahide NAKAMURA
Quoted 13 lines · Masahide NAKAMURA
Quoted 9 lines · On Mon, 9 Jun 2003 12:06:35 +0300 (EEST) Henrik Petander…
Quoted 6 lines · Masahide NAKAMURA

We don't think we have to change the logic handling policy with the reason because we can treat MIPv6 policy just like IPsec.

When we want to apply both MIPv6 and IPsec to the same target, we need one policy that has two or more of templates(e.g. one is MIPv6's template and the other is IPsec's).

Quoted 6 lines
Quoted 3 lines

Does this also mean that the IPSec and MIPv6 policies and SAs need to be configured at the same time or is it possible to add templates to an existing policy?

Currently no interface to add templates directly to it.

Then the policies for mipv6 would need to be specified at the same time as the ipsec policies. This is not a problem as long as the policies are
loaded at start up. However, this could lead to problems with
applications which specify their own policies, e.g. racoon.

Henrik

#26 lore raw
Quoted 4 lines · On Tue, 10 Jun 2003 18:25:18 +0300 Henrik Petander <[email protected]> wrote:

Then the policies for mipv6 would need to be specified at the same time as the ipsec policies. This is not a problem as long as the policies are
loaded at start up. However, this could lead to problems with
applications which specify their own policies, e.g. racoon.

How about providing interface of handling templates to update existing policy in kernel?

Regards,

Signature · 1 line
Masahide NAKAMURA
#28 lore raw
In reply to Henrik Petander

From: Henrik Petander <[email protected]>
Date: Tue, 10 Jun 2003 18:25:18 +0300

Then the policies for mipv6 would need to be specified at the same time as the ipsec policies. This is not a problem as long as the policies are
loaded at start up. However, this could lead to problems with
applications which specify their own policies, e.g. racoon.

It is an important point.

Ask yourself this, why do we have tunnel devices and don't implement them with cool routing or XFRM rules? We don't do this because as soon as you type "zebra" all your by-hand routes are gone, and as soon as you type "racoon" al your by-hand xfrm rules are gone.

If you want to do these things using routes or xfrm rules, you must integrate the creation of them into either zebra or racoon. You cannot have a setup where mipv6d and racoon/zebra fight each other flushing each other's settings. It doesn't work.

#29 lore raw
In reply to David S. Miller
Quoted 6 lines · David S. Miller

If you want to do these things using routes or xfrm rules, you must integrate the creation of them into either zebra or racoon. You cannot have a setup where mipv6d and racoon/zebra fight each other flushing each other's settings. It doesn't work.

In the routing based approach there should not be any conflicts between mipv6 and zebra: We would create cached host routes based on the existing routes. Thus if zebra was running, the mipv6 daemon would not change the routes created by zebra, but only cached host routes. If zebra changed any routes, it would cause the deletion of any invalid cached routes. The mipv6 daemon would listen to netlink messages for route deletion and would then reinsert the mipv6 state into a new cached route.

Does this make sense to you?

Thanks,

Henrik

#30 lore raw

From: Henrik Petander <[email protected]>
Date: Wed, 11 Jun 2003 11:48:19 +0300

Does this make sense to you?

No it doesn't. When you startup zebra, it may flush the entire routing table.

You must make zebra aware of any static or dynamic routes you care about. It manages entire routing table and that is the end of the story.

#31 lore raw
Quoted 7 lines · David S. Miller

From: Henrik Petander <[email protected]>
Date: Wed, 11 Jun 2003 11:48:19 +0300

Does this make sense to you?

No it doesn't. When you startup zebra, it may flush the entire routing table.

I don't see a problem in that. It would only result in a short period of missing mipv6 route optimization information, until MIPv6 daemon reinserted the mipv6 information. MIPv6 daemon would do this after getting a notification of the deletion of the old mipv6 related cached routes. This would relate to zebra in the same way as pmtu discovery.

Regards,

Henrik

#32 lore raw

From: Henrik Petander <[email protected]>
Date: Thu, 12 Jun 2003 11:44:49 +0300

MIPv6 daemon would do this after getting a notification of the deletion of the old mipv6 related cached routes.

Ok.

#33 lore raw
In reply to Henrik Petander
Quoted 9 lines · On Thu, 12 Jun 2003 11:44:49 +0300 Henrik Petander <[email protected]> wrote:
Quoted 2 lines

No it doesn't. When you startup zebra, it may flush the entire routing table.

I don't see a problem in that. It would only result in a short period of missing mipv6 route optimization information, until MIPv6 daemon reinserted the mipv6 information. MIPv6 daemon would do this after getting a notification of the deletion of the old mipv6 related cached routes. This would relate to zebra in the same way as pmtu discovery.

When routing information is deleted by zebra, the packets from user application will be sent incorrectly until MIPv6 daemon re-inserts the special host route.

Anyway, in the xfrm based approach,

I suggested that MIPv6 should use the same policy as IPsec(racoon), however, it causes problems as David and Henrik said.

So, I suggest a little other plan like below:
How about making new policy(MIPv6 policy) in the similar way of IPsec? MIPv6 and IPsec policy are managed by separated list.

In that way we have to notice about both of policies and state order in looking xfrm up or creating bundle.
I think there is not period issue like above.

I think, in networking operation, it seems natural way to use stackable destination, and Henrik's patch(mip6-exthdr.patch;maybe sent to netdev at 5 Jun) is almost the same one.

The first step is we should have two kinds of policy, IPsec and MIP6. In this step, we make MIP6 stack to use stackable destination and some XFRM with MIP6 policy.
Probably the second step will be to modify xfrm_policy is not a IPsec's SPD but generic one.

How about you?

Regards,

Signature · 1 line
Masahide NAKAMURA
#34 lore raw
Quoted 9 lines · Masahide NAKAMURA
Quoted 2 lines · On Thu, 12 Jun 2003 11:44:49 +0300 Henrik Petander <[email protected]> wrote:

I don't see a problem in that. It would only result in a short period of missing mipv6 route optimization information, until MIPv6 daemon reinserted the mipv6 information. MIPv6 daemon would do this after getting a notification of the deletion of the old mipv6 related cached routes. This would relate to zebra in the same way as pmtu discovery.

When routing information is deleted by zebra, the packets from user application will be sent incorrectly until MIPv6 daemon re-inserts the special host route.

The packets between Mobile Node and Correspondent Node would be just sent through the tunnel via Home Agent. Only parts of the direct traffic between MN and HA would be temporarily lost. Since HA is conceptually a router, the traffic between MN and HA should be very limited and Mobile IP / IPSec signaling would not be affected. This is why IMO the use of soft state is acceptable.

Quoted 2 lines

How about making new policy(MIPv6 policy) in the similar way of IPsec? MIPv6 and IPsec policy are managed by separated list.

It would be a good solution from our POV, since it should work well with IPSec.

Regards,

Henrik