diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2003-08-27 00:33:35 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2003-08-27 00:33:35 +0000 |
commit | 89d4983750d29c71ec08fa03c2ae3504ffd8bd8c (patch) | |
tree | 482daff716aefc3417233f23eae3d89ec4900f1c /sys/net/radix.c | |
parent | 1c0b90edde1c586ef0ce4bbdab5739637795fd93 (diff) |
RNF_IGNORE can corrupt the radix tree when an interface is down, it
makes routing lookups slightly more expensive, and serves no useful
purpose.
ok itojun@ tedu@
Diffstat (limited to 'sys/net/radix.c')
-rw-r--r-- | sys/net/radix.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/net/radix.c b/sys/net/radix.c index 922916df22b..be37955d238 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radix.c,v 1.10 2003/06/02 23:28:12 millert Exp $ */ +/* $OpenBSD: radix.c,v 1.11 2003/08/27 00:33:34 henric Exp $ */ /* $NetBSD: radix.c,v 1.11 1996/03/16 23:55:36 christos Exp $ */ /* @@ -262,7 +262,7 @@ on1: */ if ((saved_t = t)->rn_mask == 0) t = t->rn_dupedkey; - for (; t && !(t->rn_flags & RNF_IGNORE); t = t->rn_dupedkey) + for (; t; t = t->rn_dupedkey) /* * Even if we don't match exactly as a host, * we may match if the leaf we wound up at is @@ -287,16 +287,14 @@ on1: */ do { if (m->rm_flags & RNF_NORMAL) { - if (rn_b <= m->rm_b && - !(m->rm_flags & RNF_IGNORE)) + if (rn_b <= m->rm_b) return (m->rm_leaf); } else { off = min(t->rn_off, matched_off); x = rn_search_m(v, t, m->rm_mask); while (x && x->rn_mask != m->rm_mask) x = x->rn_dupedkey; - if (x && !(x->rn_flags & RNF_IGNORE) && - rn_satsifies_leaf(v, x, off)) + if (x && rn_satsifies_leaf(v, x, off)) return x; } } while ((m = m->rm_mklist) != NULL); |