diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2024-02-29 12:02:00 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2024-02-29 12:02:00 +0000 |
commit | 27542f42eb55c557e4fec4f7be54e2a4b2afe5f4 (patch) | |
tree | 871a2fd1e548f9181e02d42324d4fa4b08d6e660 /sys/net | |
parent | fce5b79788a00f1b2c0e064e3ed47433c0db5d82 (diff) |
revert "Combine route_cache() and rtalloc_mpath() in new route_mpath()"
It breaks NFS.
ok claudio@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/route.c | 42 | ||||
-rw-r--r-- | sys/net/route.h | 6 |
2 files changed, 2 insertions, 46 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index ffc87f6e985..9dadb5aa5eb 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.434 2024/02/27 12:37:49 bluhm Exp $ */ +/* $OpenBSD: route.c,v 1.435 2024/02/29 12:01:59 naddy Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -239,28 +239,6 @@ route_cache(struct route *ro, const struct in_addr *dst, return (ESRCH); } -/* - * Check cache for route, else allocate a new one, potentially using multipath - * to select the peer. Update cache and return valid route or NULL. - */ -struct rtentry * -route_mpath(struct route *ro, const struct in_addr *dst, - const struct in_addr *src, u_int rtableid) -{ - if (route_cache(ro, dst, src, rtableid)) { - uint32_t *s = NULL; - - if (ro->ro_srcin.s_addr != INADDR_ANY) - s = &ro->ro_srcin.s_addr; - ro->ro_rt = rtalloc_mpath(&ro->ro_dstsa, s, ro->ro_tableid); - if (!rtisvalid(ro->ro_rt)) { - rtfree(ro->ro_rt); - ro->ro_rt = NULL; - } - } - return (ro->ro_rt); -} - #ifdef INET6 int route6_cache(struct route *ro, const struct in6_addr *dst, @@ -299,24 +277,6 @@ route6_cache(struct route *ro, const struct in6_addr *dst, return (ESRCH); } - -struct rtentry * -route6_mpath(struct route *ro, const struct in6_addr *dst, - const struct in6_addr *src, u_int rtableid) -{ - if (route6_cache(ro, dst, src, rtableid)) { - uint32_t *s = NULL; - - if (!IN6_IS_ADDR_UNSPECIFIED(&ro->ro_srcin6)) - s = &ro->ro_srcin6.s6_addr32[0]; - ro->ro_rt = rtalloc_mpath(&ro->ro_dstsa, s, ro->ro_tableid); - if (!rtisvalid(ro->ro_rt)) { - rtfree(ro->ro_rt); - ro->ro_rt = NULL; - } - } - return (ro->ro_rt); -} #endif /* diff --git a/sys/net/route.h b/sys/net/route.h index 6a7ee94e644..c05a70d0636 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.208 2024/02/27 12:37:49 bluhm Exp $ */ +/* $OpenBSD: route.h,v 1.209 2024/02/29 12:01:59 naddy Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -465,12 +465,8 @@ struct bfd_config; void route_init(void); int route_cache(struct route *, const struct in_addr *, const struct in_addr *, u_int); -struct rtentry *route_mpath(struct route *, const struct in_addr *, - const struct in_addr *, u_int); int route6_cache(struct route *, const struct in6_addr *, const struct in6_addr *, u_int); -struct rtentry *route6_mpath(struct route *, const struct in6_addr *, - const struct in6_addr *, u_int); void rtm_ifchg(struct ifnet *); void rtm_ifannounce(struct ifnet *, int); void rtm_bfd(struct bfd_config *); |