diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2004-04-25 00:31:41 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2004-04-25 00:31:41 +0000 |
commit | 87b9a09c3d33b47f9790fa6ea7a0e572169a34b5 (patch) | |
tree | ea6ff6a2a0db5c5b7adcf0d4726b350faad27f42 /sys/net/radix.c | |
parent | ad2937f18e8119f45a938b3a3979e2560ab6ccf6 (diff) |
undo "oops" commit on 1.14 (radix_mpath).
Diffstat (limited to 'sys/net/radix.c')
-rw-r--r-- | sys/net/radix.c | 66 |
1 files changed, 4 insertions, 62 deletions
diff --git a/sys/net/radix.c b/sys/net/radix.c index b8adfd935f5..92d7022a845 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radix.c,v 1.14 2004/04/25 00:30:02 itojun Exp $ */ +/* $OpenBSD: radix.c,v 1.15 2004/04/25 00:31:40 itojun Exp $ */ /* $NetBSD: radix.c,v 1.11 1996/03/16 23:55:36 christos Exp $ */ /* @@ -49,10 +49,6 @@ #include <sys/syslog.h> #include <net/radix.h> -#ifdef RADIX_MPATH -#include <net/radix_mpath.h> -#endif - int max_keylen; struct radix_mask *rn_mkfreelist; struct radix_node_head *mask_rnhead; @@ -555,21 +551,6 @@ rn_addroute(v_arg, n_arg, head, treenodes) saved_tt = tt = rn_insert(v, head, &keyduplicated, treenodes); if (keyduplicated) { for (t = tt; tt; t = tt, tt = tt->rn_dupedkey) { -#ifdef RADIX_MPATH - /* permit multipath, if enabled for the family */ - if (rn_mpath_capable(head) && netmask == tt->rn_mask) { - /* - * go down to the end of multipaths, so that - * new entry goes into the end of rn_dupedkey - * chain. - */ - do { - t = tt; - tt = tt->rn_dupedkey; - } while (tt && t->rn_mask == tt->rn_mask); - break; - } -#endif if (tt->rn_mask == netmask) return (0); if (netmask == 0 || @@ -693,39 +674,20 @@ on2: } struct radix_node * -rn_delete(v_arg, netmask_arg, head, rn) +rn_delete(v_arg, netmask_arg, head) void *v_arg, *netmask_arg; struct radix_node_head *head; - struct radix_node *rn; { struct radix_node *t, *p, *x, *tt; struct radix_mask *m, *saved_m, **mp; struct radix_node *dupedkey, *saved_tt, *top; caddr_t v, netmask; int b, head_off, vlen; -#ifdef RADIX_MPATH - int mpath_enable = 0; -#endif v = v_arg; netmask = netmask_arg; x = head->rnh_treetop; -#ifdef RADIX_MPATH - if (rn && (rn->rn_mask != rn_zeros)) { - tt = rn; - /* - * Is this route(rn) a rn->dupedkey chain? - * Only default route is an exception. (rn_mask) - */ - if (rn_mpath_next(tt->rn_p)) - mpath_enable = 1; - else - tt = rn_search(v, x); - } else - tt = rn_search(v, x); -#else tt = rn_search(v, x); -#endif head_off = x->rn_off; vlen = *(u_char *)v; saved_tt = tt; @@ -827,16 +789,6 @@ on1: } goto out; } -#ifdef RADIX_MPATH - if (mpath_enable) { - /* - * my parent dupedkey is NULL - * end of mpath route. - */ - t->rn_dupedkey = NULL; - goto out; - } -#endif if (t->rn_l == tt) x = t->rn_r; else @@ -943,24 +895,14 @@ rn_inithead(head, off) int off; { struct radix_node_head *rnh; - + struct radix_node *t, *tt, *ttt; if (*head) return (1); R_Malloc(rnh, struct radix_node_head *, sizeof (*rnh)); if (rnh == 0) return (0); - *head = rnh; - return rn_inithead0(rnh, off); -} - -int -rn_inithead0(rnh, off) - struct radix_node_head *rnh; - int off; -{ - register struct radix_node *t, *tt, *ttt; - Bzero(rnh, sizeof (*rnh)); + *head = rnh; t = rn_newpair(rn_zeros, off, rnh->rnh_nodes); ttt = rnh->rnh_nodes + 2; t->rn_r = ttt; |