Discussion:
Mobile IPv6 for NetBSD-current
(too old to reply)
Keiichi SHIMA
2007-05-24 08:39:21 UTC
Permalink
Hello all,

I'm now working on porting the Mobile IPv6 kernel part code developed
by the SHISA project (http://www.mobileip.jp/) to NetBSD current as
its optional feature.

I put a tarball of the diff file and some new files as http://
www.mobileip.jp/~keiichi/tmp/mobile-ipv6-20070524.tgz for review.

I want to import this change to the HEAD tree, however since it is a
big change, I would like to ask any kind of comments or suggestions
for this project.

The overview of the change is:

- the type 2 routing header processing
- the home address option (one of the destination options)
processing.
- some new ICMPv6 messages defined in Mobile IPv6
- the mobility header processing (the new extension header for
Mobile IPv6 signaling messages)
- the mip pseudo interface to represent a home network
- the mobility information message exchange mechanism between
the kernel and user space programs (PF_MOBILITY socket)
- new IPv6 address properties (e.g. the HOME flag,
the DEREGISTERING flag)
- the type 2 routing header socket API
- neighbor discovery extension (e.g. retuning home detection for
mobile nodes, packet intercept by home agents)
- source address selection extension (home addresses are preferred)
- IPsec SA/SP db update according to the movement of mobile nodes.


With this change, the following files are modified:
distrib/sets/lists/comp/mi
lib/libc/net/rthdr.c
sbin/ifconfig/af_inet6.c
sbin/ifconfig/ifconfig.c
sys/conf/files
sys/net/Makefile
sys/net/if_types.h
sys/net/pfkeyv2.h
sys/net/route.h
sys/net/rtsock.c
sys/netinet/Makefile
sys/netinet/icmp6.h
sys/netinet/in.h
sys/netinet/ip6.h
sys/netinet6/Makefile
sys/netinet6/dest6.c
sys/netinet6/files.netinet6
sys/netinet6/in6.c
sys/netinet6/in6.h
sys/netinet6/in6_proto.c
sys/netinet6/in6_src.c
sys/netinet6/in6_var.h
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_input.c
sys/netinet6/ip6_output.c
sys/netinet6/ip6_var.h
sys/netinet6/ipsec.c
sys/netinet6/nd6.c
sys/netinet6/nd6.h
sys/netinet6/nd6_nbr.c
sys/netinet6/nd6_rtr.c
sys/netinet6/raw_ip6.c
sys/netinet6/route6.c
sys/netkey/key.c
sys/netkey/key.h
sys/sys/socket.h

The change introduces these new files
sys/net/if_mip.c
sys/net/if_mip.h
sys/net/mipsock.c
sys/net/mipsock.h
sys/netinet/ip6mh.h
sys/netinet6/mip6.c
sys/netinet6/mip6.h
sys/netinet6/mip6_var.h


Best Regards,

---
Keiichi SHIMA
IIJ Research Laboratory <***@iijlab.net>
WIDE Project <***@wide.ad.jp>




--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Keiichi SHIMA
2007-06-07 09:08:15 UTC
Permalink
Hello,
Post by Keiichi SHIMA
I'm now working on porting the Mobile IPv6 kernel part code
developed by the SHISA project (http://www.mobileip.jp/) to NetBSD
current as its optional feature.
I put a tarball of the diff file and some new files as http://
www.mobileip.jp/~keiichi/tmp/mobile-ipv6-20070524.tgz for review.
I want to import this change to the HEAD tree, however since it is
a big change, I would like to ask any kind of comments or
suggestions for this project.
I got two types of comments, one is about documentation, the other is
technical one.

1-1) Having how-to document about Mobile IPv6 (similar to that of
IPv6) in the NetBSD web page is better.

1-2) Manual pages should be prepared accordingly. For new commands
and interfaces have to be prepared, and some commands extended by
this patch should also be updated accordingly.

2) The patch touches IPsec DB. Since the NetBSD code is now working
on the FAST_IPSEC mechanism, the patch should also handle it.


For the documentation, I'll prepare them. For the new IPsec stack,
I'll investigate the new code and make a patch and ask for review
again. After the second review, I'll import the patch to the HEAD tree.

Thank you for your comments and suggestions.

---
Keiichi SHIMA
IIJ Research Laboratory <***@iijlab.net>
WIDE Project <***@wide.ad.jp>




--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young
2007-06-07 09:54:21 UTC
Permalink
Post by Keiichi SHIMA
Hello all,
I'm now working on porting the Mobile IPv6 kernel part code developed
by the SHISA project (http://www.mobileip.jp/) to NetBSD current as
its optional feature.
I put a tarball of the diff file and some new files as http://
www.mobileip.jp/~keiichi/tmp/mobile-ipv6-20070524.tgz for review.
I want to import this change to the HEAD tree, however since it is a
big change, I would like to ask any kind of comments or suggestions
for this project.
The patch sprinkles #ifdef MOBILE_IPV6 / #endif all over the IPv6 code.
That does not help the readability of the IPv6 code. Surely you can
confine the #ifdefs to fewer places and fewer files? For example, can you
introduce some predicate that always evaluates to 0 #ifndef MOBILE_IPV6,
instead of the following?

/* reject read-only flags */
if ((ifra->ifra_flags & IN6_IFF_DUPLICATED) != 0 ||
(ifra->ifra_flags & IN6_IFF_DETACHED) != 0 ||
+#if !(defined(MOBILE_IPV6) && NMIP > 0)
(ifra->ifra_flags & IN6_IFF_NODAD) != 0 ||
+#endif /* MOBILE_IPV6 && NMIP > 0 */
(ifra->ifra_flags & IN6_IFF_AUTOCONF) != 0) {
return EINVAL;
}

This deserves the same treatment:

- if (hostIsNew && in6if_do_dad(ifp))
+ if (hostIsNew && in6if_do_dad(ifp)
+#if defined(MOBILE_IPV6) && NMIP > 0
+ && !(ia->ia6_flags & IN6_IFF_HOME) /* XXX XXX XXX */
+#endif /* MOBILE_IPV6 && NMIP > 0 */
+ )
ia->ia6_flags |= IN6_IFF_TENTATIVE;

In this case, I suggest extracting static inline subroutine that is empty
#if !defined(MOBILE_IPV6) || NMIP == 0, instead of manually inlining
this code:

+#if defined(MOBILE_IPV6) && NMIP > 0
+ {
+ struct mip6_bul_internal *mbul;
+ while ((mbul = LIST_FIRST(&ia->ia6_mbul_list)) != NULL) {
+ mip6_bul_remove(mbul);
+ }
+ }
+#endif /* MOBILE_IPV6 && NMIP > 0 */
+

Here, too:

+#if defined(MOBILE_IPV6) && NMIP > 0
+ {
+ /*
+ * XXX skip IPsec policy integrity check if the next
+ * hop is me. This is dirty but we need this trick
+ * when we use an IPsec tunnel mode policy for
+ * protocol 'any' between a home agent and a mobile
+ * node.
+ */
+ struct in6_ifaddr *ia;
+
+ for (ia = in6_ifaddr; ia; ia = ia->ia_next) {
+ if ((ia->ia6_flags & IN6_IFF_NOTREADY) == 0 &&
+ IN6_ARE_ADDR_EQUAL(&ia->ia_addr.sin6_addr,
+ &ip6->ip6_dst))
+ goto skip_ipsec6_in_reject;
+ }
+ }
+#endif /* MOBILE_IPV6 && NMIP > 0 */

Finally, and I realize this is vague, maybe you can get some leverage
out of the linker?

Dave
--
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933 ext 24

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ignatios Souvatzis
2007-10-11 11:12:32 UTC
Permalink
Post by Keiichi SHIMA
Hello all,
I'm now working on porting the Mobile IPv6 kernel part code developed
by the SHISA project (http://www.mobileip.jp/) to NetBSD current as
its optional feature.
What happened to this project?

-is

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Keiichi SHIMA
2007-10-15 12:16:24 UTC
Permalink
Hello,
Post by Ignatios Souvatzis
Post by Keiichi SHIMA
Hello all,
I'm now working on porting the Mobile IPv6 kernel part code
developed
by the SHISA project (http://www.mobileip.jp/) to NetBSD current as
its optional feature.
What happened to this project?
I'm still working on it. The local code is synced with the NetBSD
current code, but I have not completed all the comments received from
this mailing list.

I need some more time to reflect the code to the current tree.

---
Keiichi SHIMA
IIJ Research Laboratory <***@iijlab.net>
WIDE Project <***@wide.ad.jp>




--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...