summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-02-12 11:19:58 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-02-12 11:19:58 +0000
commitdecfe57fa3f14605bd72687623cb0c47d57e9f64 (patch)
treeaba66ceb80333fcb1c57622753e6c0237d82d16a
parent82103445d53ba7e2d061425eaf34f57e618df953 (diff)
When purging the routes corresponding to an ifp, skip the routing tables
of different routing domains. The same change has been applied to rt_if_track() in r1.205. ok claudio@
-rw-r--r--sys/net/route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index c3959f26ccf..a2e07d803f1 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.206 2015/02/11 23:34:43 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.207 2015/02/12 11:19:57 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1613,6 +1613,9 @@ rt_if_remove(struct ifnet *ifp)
struct radix_node_head *rnh;
for (tid = 0; tid <= rtbl_id_max; tid++) {
+ /* skip rtables that are not in the rdomain of the ifp */
+ if (rtable_l2(tid) != ifp->if_rdomain)
+ continue;
for (i = 1; i <= AF_MAX; i++) {
if ((rnh = rtable_get(tid, i)) != NULL)
while ((*rnh->rnh_walktree)(rnh,