diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-14 10:09:31 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-14 10:09:31 +0000 |
commit | ba713922bfb5e418eb0ecbeff735a08d37bb330a (patch) | |
tree | 8fd2aecd29dc0d9dc84102584fbf69dff13dbe2e /sys/net/route.c | |
parent | f3f1a2b45b7111f8b56d40f4837ebb02ff6dccf3 (diff) |
Rewrite the logic around the dymanic array of routing tables to help
turning rtable_get(9) MP-safe.
Use only one per-AF array, as suggested by claudio@, pointing to an
array of pointers to the routing table heads.
Routing tables are now allocated/initialized per-AF. This will let
us allocate routing table on-demand instead of always having an
AF_INET, AF_MPLS and AF_INET table as soon as a new rtableID is used.
This also get rid of the "void ***" madness.
ok dlg@, jmatthew@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 861a43294c9..fcf62811f6f 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.250 2015/10/13 09:59:37 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.251 2015/10/14 10:09:30 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -139,7 +139,6 @@ /* Give some jitter to hash, to avoid synchronization between routers. */ static uint32_t rt_hashjitter; -extern void ***rtables; extern unsigned int rtables_id_max; struct rtstat rtstat; @@ -1657,9 +1656,6 @@ rt_if_track(struct ifnet *ifp) int i; u_int tid; - if (rtables == NULL) - return; - for (tid = 0; tid <= rtables_id_max; tid++) { /* skip rtables that are not in the rdomain of the ifp */ if (rtable_l2(tid) != ifp->if_rdomain) |