diff options
author | julian <julian@FreeBSD.org> | 2008-09-14 08:19:48 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2008-09-14 08:19:48 +0000 |
commit | 4d475b063c3db123002a792569518ef9d8e5a2ef (patch) | |
tree | 2c18e8a3db95e093c313dc15286cfe2f1d8ca059 /sys/net/route.c | |
parent | 7238ec0b33915c236ffd27e412b0a4f7a92071d5 (diff) | |
download | FreeBSD-src-4d475b063c3db123002a792569518ef9d8e5a2ef.zip FreeBSD-src-4d475b063c3db123002a792569518ef9d8e5a2ef.tar.gz |
Revert a part of the MRT commit that proved un-needed.
rt_check() in its original form proved to be sufficient and
rt_check_fib() can go away (as can its evil twin in_rt_check()).
I believe this does NOT address the crashes people have been seeing
in rt_check.
MFC after: 1 week
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 53a207c..95c46ca 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1675,7 +1675,6 @@ rtinit(struct ifaddr *ifa, int cmd, int flags) * final destination if directly reachable); * *lrt0 points to the cached route to the final destination; * *lrt is not meaningful; - * fibnum is the index to the correct network fib for this packet * * === Operation === * If the route is marked down try to find a new route. If the route @@ -1692,19 +1691,14 @@ rtinit(struct ifaddr *ifa, int cmd, int flags) int rt_check(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst) { - return (rt_check_fib(lrt, lrt0, dst, 0)); -} - -int -rt_check_fib(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst, - u_int fibnum) -{ struct rtentry *rt; struct rtentry *rt0; + u_int fibnum; int error; KASSERT(*lrt0 != NULL, ("rt_check")); rt = rt0 = *lrt0; + fibnum = (*rt0)->rt_fibnum; /* NB: the locking here is tortuous... */ RT_LOCK(rt); @@ -1730,8 +1724,7 @@ rt_check_fib(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst, rt0->rt_gwroute = NULL; lookup: RT_UNLOCK(rt0); -/* XXX MRT link level looked up in table 0 */ - rt = rtalloc1_fib(rt->rt_gateway, 1, 0UL, 0); + rt = rtalloc1_fib(rt->rt_gateway, 1, 0UL, fibnum); if (rt == rt0) { RT_REMREF(rt0); RT_UNLOCK(rt0); |