summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2024-02-29 12:02:00 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2024-02-29 12:02:00 +0000
commit27542f42eb55c557e4fec4f7be54e2a4b2afe5f4 (patch)
tree871a2fd1e548f9181e02d42324d4fa4b08d6e660 /sys/net/route.c
parentfce5b79788a00f1b2c0e064e3ed47433c0db5d82 (diff)
revert "Combine route_cache() and rtalloc_mpath() in new route_mpath()"
It breaks NFS. ok claudio@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c42
1 files changed, 1 insertions, 41 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
/*