diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-06-17 20:30:35 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-06-17 20:30:35 +0000 |
commit | 2506e4fddb73443f06845931cc69311091dc5227 (patch) | |
tree | 9b135a2a3cc0e422822232146b78de109d2fce2b /sys/net/radix.c | |
parent | 06b8c1482e533f04a5c9997410492000b1a9f860 (diff) |
on ifconfig down ignore all routes pointing to the downed interface.
okay itojun@ deraadt@
Diffstat (limited to 'sys/net/radix.c')
-rw-r--r-- | sys/net/radix.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/net/radix.c b/sys/net/radix.c index 29e6a198774..22d36981b9c 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radix.c,v 1.4 1996/09/05 08:42:32 mickey Exp $ */ +/* $OpenBSD: radix.c,v 1.5 2000/06/17 20:30:34 provos Exp $ */ /* $NetBSD: radix.c,v 1.11 1996/03/16 23:55:36 christos Exp $ */ /* @@ -264,7 +264,7 @@ on1: */ if ((saved_t = t)->rn_mask == 0) t = t->rn_dupedkey; - for (; t; t = t->rn_dupedkey) + for (; t && !(t->rn_flags & RNF_IGNORE); 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 @@ -289,14 +289,16 @@ on1: */ do { if (m->rm_flags & RNF_NORMAL) { - if (rn_b <= m->rm_b) + if (rn_b <= m->rm_b && + !(m->rm_flags & RNF_IGNORE)) 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 && rn_satsifies_leaf(v, x, off)) + if (x && !(x->rn_flags & RNF_IGNORE) && + rn_satsifies_leaf(v, x, off)) return x; } } while ((m = m->rm_mklist) != NULL); |