diff options
author | 2004-04-25 02:48:03 +0000 | |
---|---|---|
committer | 2004-04-25 02:48:03 +0000 | |
commit | f40e51e01c571dc79398ecc0d1072a053a2f61d2 (patch) | |
tree | 24758f804f01c4d104b1c00bed2011965fe373f9 /sys/netinet6/in6_proto.c | |
parent | sync 'other' in test6, too. (diff) | |
download | wireguard-openbsd-f40e51e01c571dc79398ecc0d1072a053a2f61d2.tar.xz wireguard-openbsd-f40e51e01c571dc79398ecc0d1072a053a2f61d2.zip |
radix tree with multipath support. from kame. deraadt ok
user visible changes:
- you can add multiple routes with same key (route add A B then route add A C)
- you have to specify gateway address if there are multiple entries on the table
(route delete A B, instead of route delete A)
kernel change:
- radix_node_head has an extra entry
- rnh_deladdr takes extra argument
TODO:
- actually take advantage of multipath (rtalloc -> rtalloc_mpath)
Diffstat (limited to 'sys/netinet6/in6_proto.c')
-rw-r--r-- | sys/netinet6/in6_proto.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 0c9d66e4fdf..bb5d9696dc9 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_proto.c,v 1.43 2003/10/31 09:00:32 mcbride Exp $ */ +/* $OpenBSD: in6_proto.c,v 1.44 2004/04/25 02:48:04 itojun Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -70,6 +70,9 @@ #include <net/if.h> #include <net/radix.h> +#ifndef SMALL_KERNEL +#include <net/radix_mpath.h> +#endif #include <net/route.h> #include <netinet/in.h> @@ -234,7 +237,11 @@ struct domain inet6domain = { AF_INET6, "internet6", 0, 0, 0, (struct protosw *)inet6sw, (struct protosw *)&inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])], 0, +#ifndef SMALL_KERNEL + rn_mpath_inithead, +#else rn_inithead, +#endif offsetof(struct sockaddr_in6, sin6_addr) << 3, sizeof(struct sockaddr_in6), in6_domifattach, in6_domifdetach, }; |