summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-12-09 19:44:53 +0000
committerbz <bz@FreeBSD.org>2008-12-09 19:44:53 +0000
commitd9daa4b827ce0585d39eb0ef034125f8b5dca574 (patch)
treefd2d77e841a43683555cbf922e7af9f515ea59b8 /sys/net
parent13d2c49a2f73e459dbd0573ffcd6009487f155e9 (diff)
downloadFreeBSD-src-d9daa4b827ce0585d39eb0ef034125f8b5dca574.zip
FreeBSD-src-d9daa4b827ce0585d39eb0ef034125f8b5dca574.tar.gz
Fix a bug introduced in r185747: rather than dereferencing an uninitialized
*rt to something undefined, use the fibnum that came in as function argument. Found with: Coverity Prevent(tm) CID: 4168
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 565564a..365ec1e 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -513,7 +513,7 @@ rtredirect_fib(struct sockaddr *dst,
struct rt_addrinfo info;
struct ifaddr *ifa;
struct radix_node_head *rnh =
- V_rt_tables[rt->rt_fibnum][dst->sa_family];
+ V_rt_tables[fibnum][dst->sa_family];
/* verify the gateway is directly reachable */
if ((ifa = ifa_ifwithnet(gateway)) == NULL) {
OpenPOWER on IntegriCloud