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 | |
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')
-rw-r--r-- | sys/net/if_atmsubr.c | 3 | ||||
-rw-r--r-- | sys/net/if_fwsubr.c | 2 | ||||
-rw-r--r-- | sys/net/if_iso88025subr.c | 3 | ||||
-rw-r--r-- | sys/net/route.c | 13 | ||||
-rw-r--r-- | sys/net/route.h | 3 |
5 files changed, 7 insertions, 17 deletions
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index 1564737..9d1a7fa 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -158,8 +158,7 @@ atm_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, * check route */ if (rt0 != NULL) { - error = rt_check_fib(&rt, &rt0, - dst, rt0->rt_fibnum); + error = rt_check(&rt, &rt0, dst); if (error) goto bad; RT_UNLOCK(rt); diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c index 65b2aff..e001c29 100644 --- a/sys/net/if_fwsubr.c +++ b/sys/net/if_fwsubr.c @@ -103,7 +103,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, } if (rt0 != NULL) { - error = rt_check_fib(&rt, &rt0, dst, rt0->rt_fibnum); + error = rt_check(&rt, &rt0, dst); if (error) goto bad; RT_UNLOCK(rt); diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c index f56101e..dd50923 100644 --- a/sys/net/if_iso88025subr.c +++ b/sys/net/if_iso88025subr.c @@ -259,8 +259,7 @@ iso88025_output(ifp, m, dst, rt0) /* Calculate routing info length based on arp table entry */ /* XXX any better way to do this ? */ if (rt0 != NULL) { -/* XXX MRT *//* Guess only */ - error = rt_check_fib(&rt, &rt0, dst, rt0->rt_fibnum); + error = rt_check(&rt, &rt0, dst); if (error) goto bad; RT_UNLOCK(rt); 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); diff --git a/sys/net/route.h b/sys/net/route.h index 906bfb2..2c9afb2 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -357,6 +357,7 @@ int rt_setgate(struct rtentry *, struct sockaddr *, struct sockaddr *); int rtexpunge(struct rtentry *); void rtfree(struct rtentry *); +int rt_check(struct rtentry **, struct rtentry **, struct sockaddr *); /* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */ /* Thes are used by old code not yet converted to use multiple FIBS */ @@ -371,7 +372,6 @@ void rtredirect(struct sockaddr *, struct sockaddr *, int rtrequest(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **); int rtrequest1(int, struct rt_addrinfo *, struct rtentry **); -int rt_check(struct rtentry **, struct rtentry **, struct sockaddr *); /* defaults to "all" FIBs */ int rtinit_fib(struct ifaddr *, int, int); @@ -390,7 +390,6 @@ void rtredirect_fib(struct sockaddr *, struct sockaddr *, int rtrequest_fib(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int); int rtrequest1_fib(int, struct rt_addrinfo *, struct rtentry **, u_int); -int rt_check_fib(struct rtentry **, struct rtentry **, struct sockaddr *, u_int); #include <sys/eventhandler.h> typedef void (*rtevent_arp_update_fn)(void *, struct rtentry *, uint8_t *, struct sockaddr *); |