Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163541004
D24977.id72168.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24977.id72168.diff
View Options
Index: sys/fs/nfsclient/nfs_clport.c
===================================================================
--- sys/fs/nfsclient/nfs_clport.c
+++ sys/fs/nfsclient/nfs_clport.c
@@ -53,6 +53,7 @@
#include <netinet/if_ether.h>
#include <netinet6/ip6_var.h>
#include <net/if_types.h>
+#include <net/route/nhop.h>
#include <fs/nfsclient/nfs_kdtrace.h>
@@ -976,24 +977,29 @@
#endif
#ifdef INET
if (nmp->nm_nam->sa_family == AF_INET) {
+ struct epoch_tracker et;
+ struct nhop_object *nh;
struct sockaddr_in *sin;
- struct nhop4_extended nh_ext;
+ struct in_addr addr = {};
sin = (struct sockaddr_in *)nmp->nm_nam;
+ NET_EPOCH_ENTER(et);
CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred));
- error = fib4_lookup_nh_ext(fibnum, sin->sin_addr, 0, 0,
- &nh_ext);
+ nh = fib4_lookup(fibnum, sin->sin_addr, 0, NHR_NONE, 0);
CURVNET_RESTORE();
- if (error != 0)
+ if (nh != NULL)
+ addr = IA_SIN(ifatoia(nh->nh_ifa))->sin_addr;
+ NET_EPOCH_EXIT(et);
+ if (nh == NULL)
return (NULL);
- if (IN_LOOPBACK(ntohl(nh_ext.nh_src.s_addr))) {
+ if (IN_LOOPBACK(ntohl(addr.s_addr))) {
/* Ignore loopback addresses */
return (NULL);
}
*isinet6p = 0;
- *((struct in_addr *)paddr) = nh_ext.nh_src;
+ *((struct in_addr *)paddr) = addr;
return (u_int8_t *)paddr;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 7:16 AM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35466587
Default Alt Text
D24977.id72168.diff (1 KB)
Attached To
Mode
D24977: Make NFS address selection use fib4_lookup().
Attached
Detach File
Event Timeline
Log In to Comment