summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-06-01 15:49:42 +0000
committerbz <bz@FreeBSD.org>2009-06-01 15:49:42 +0000
commitc62e99f85d6b43e872928cb1f83b13335b7b5d51 (patch)
tree743a83cdd0c6416f952293952e112bd315518157 /sys/nfsclient
parentc731979fffc05b5f4ec31fd935fe3bed200a0b42 (diff)
downloadFreeBSD-src-c62e99f85d6b43e872928cb1f83b13335b7b5d51.zip
FreeBSD-src-c62e99f85d6b43e872928cb1f83b13335b7b5d51.tar.gz
Convert the two dimensional array to be malloced and introduce
an accessor function to get the correct rnh pointer back. Update netstat to get the correct pointer using kvm_read() as well. This not only fixes the ABI problem depending on the kernel option but also permits the tunable to overwrite the kernel option at boot time up to MAXFIBS, enlarging the number of FIBs without having to recompile. So people could just use GENERIC now. Reviewed by: julian, rwatson, zec X-MFC: not possible
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/bootp_subr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index d3151c9..6f61abd 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -361,11 +361,15 @@ void
bootpboot_p_rtlist(void)
{
INIT_VNET_NET(curvnet);
+ struct radix_node_head *rnh;
printf("Routing table:\n");
- RADIX_NODE_HEAD_RLOCK(V_rt_tables[0][AF_INET]); /* could sleep XXX */
- bootpboot_p_tree(V_rt_tables[0][AF_INET]->rnh_treetop);
- RADIX_NODE_HEAD_RUNLOCK(V_rt_tables[0][AF_INET]);
+ rnh = rt_tables_get_rnh(0, AF_INET);
+ if (rnh == NULL)
+ return;
+ RADIX_NODE_HEAD_RLOCK(rnh); /* could sleep XXX */
+ bootpboot_p_tree(rnh->rnh_treetop);
+ RADIX_NODE_HEAD_RUNLOCK(rnh);
}
void
OpenPOWER on IntegriCloud