summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_pcb.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/netinet6/in6_pcb.c
parentfce5b79788a00f1b2c0e064e3ed47433c0db5d82 (diff)
revert "Combine route_cache() and rtalloc_mpath() in new route_mpath()"
It breaks NFS. ok claudio@
Diffstat (limited to 'sys/netinet6/in6_pcb.c')
-rw-r--r--sys/netinet6/in6_pcb.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index c678bbf5696..ac10047a6f3 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.140 2024/02/27 12:37:49 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.141 2024/02/29 12:01:59 naddy Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -561,10 +561,16 @@ in6_pcbnotify(struct inpcbtable *table, const struct sockaddr_in6 *dst,
struct rtentry *
in6_pcbrtentry(struct inpcb *inp)
{
+ struct route *ro = &inp->inp_route;
+
if (IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6))
return (NULL);
- return (route6_mpath(&inp->inp_route, &inp->inp_faddr6,
- &inp->inp_laddr6, inp->inp_rtableid));
+ if (route6_cache(ro, &inp->inp_faddr6, &inp->inp_laddr6,
+ inp->inp_rtableid)) {
+ ro->ro_rt = rtalloc_mpath(&ro->ro_dstsa,
+ &inp->inp_laddr6.s6_addr32[0], ro->ro_tableid);
+ }
+ return (ro->ro_rt);
}
struct inpcb *