Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144267848
D28647.id83973.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D28647.id83973.diff
View Options
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -1006,15 +1006,18 @@
#endif
#ifdef INET6
if (nmp->nm_nam->sa_family == AF_INET6) {
+ struct epoch_tracker et;
struct sockaddr_in6 *sin6;
int error;
sin6 = (struct sockaddr_in6 *)nmp->nm_nam;
+ NET_EPOCH_ENTER(et);
CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred));
error = in6_selectsrc_addr(fibnum, &sin6->sin6_addr,
sin6->sin6_scope_id, NULL, paddr, NULL);
CURVNET_RESTORE();
+ NET_EPOCH_EXIT(et);
if (error != 0)
return (NULL);
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -260,6 +260,7 @@
{
struct ip6_hdr *oip6, *nip6;
struct icmp6_hdr *icmp6;
+ struct epoch_tracker et;
u_int preplen;
int off;
int nxt;
@@ -379,7 +380,9 @@
icmp6->icmp6_pptr = htonl((u_int32_t)param);
ICMP6STAT_INC(icp6s_outhist[type]);
+ NET_EPOCH_ENTER(et);
icmp6_reflect(m, sizeof(struct ip6_hdr)); /* header order: IPv6 - ICMPv6 */
+ NET_EPOCH_EXIT(et);
return;
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -352,6 +352,7 @@
int error = 0;
int scope_ambiguous = 0;
struct in6_addr in6a;
+ struct epoch_tracker et;
INP_WLOCK_ASSERT(inp);
INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); /* XXXRW: why? */
@@ -379,8 +380,10 @@
if ((error = prison_remote_ip6(inp->inp_cred, &sin6->sin6_addr)) != 0)
return (error);
+ NET_EPOCH_ENTER(et);
error = in6_selectsrc_socket(sin6, inp->in6p_outputopts,
inp, inp->inp_cred, scope_ambiguous, &in6a, NULL);
+ NET_EPOCH_EXIT(et);
if (error)
return (error);
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -191,6 +191,7 @@
int error;
struct ip6_moptions *mopts;
+ NET_EPOCH_ASSERT();
KASSERT(srcp != NULL, ("%s: srcp is NULL", __func__));
dst = dstsock->sin6_addr; /* make a copy for local operation */
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -413,6 +413,8 @@
int maxlen;
caddr_t mac;
+ NET_EPOCH_ASSERT();
+
if (IN6_IS_ADDR_MULTICAST(taddr6))
return;
@@ -947,6 +949,8 @@
struct in6_addr daddr6, dst6, src6;
uint32_t scopeid;
+ NET_EPOCH_ASSERT();
+
int icmp6len, maxlen, error;
caddr_t mac = NULL;
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -478,8 +478,10 @@
/*
* Source address selection.
*/
+ NET_EPOCH_ENTER(et);
error = in6_selectsrc_socket(dstsock, optp, inp, so->so_cred,
scope_ambiguous, &in6a, &hlim);
+ NET_EPOCH_EXIT(et);
if (error)
goto bad;
@@ -795,6 +797,7 @@
struct inpcb *inp;
struct sockaddr_in6 *addr = (struct sockaddr_in6 *)nam;
struct in6_addr in6a;
+ struct epoch_tracker et;
int error = 0, scope_ambiguous = 0;
inp = sotoinpcb(so);
@@ -823,8 +826,10 @@
INP_INFO_WLOCK(&V_ripcbinfo);
INP_WLOCK(inp);
/* Source address selection. XXX: need pcblookup? */
+ NET_EPOCH_ENTER(et);
error = in6_selectsrc_socket(addr, inp->in6p_outputopts,
inp, so->so_cred, scope_ambiguous, &in6a, NULL);
+ NET_EPOCH_EXIT(et);
if (error) {
INP_WUNLOCK(inp);
INP_INFO_WUNLOCK(&V_ripcbinfo);
diff --git a/sys/netinet6/send.c b/sys/netinet6/send.c
--- a/sys/netinet6/send.c
+++ b/sys/netinet6/send.c
@@ -115,6 +115,7 @@
struct ip6_hdr *ip6;
struct sockaddr_in6 dst;
struct icmp6_hdr *icmp6;
+ struct epoch_tracker et;
int icmp6len;
/*
@@ -150,7 +151,9 @@
*/
switch (icmp6->icmp6_type) {
case ND_NEIGHBOR_SOLICIT:
+ NET_EPOCH_ENTER(et);
nd6_ns_input(m, sizeof(struct ip6_hdr), icmp6len);
+ NET_EPOCH_EXIT(et);
break;
case ND_NEIGHBOR_ADVERT:
nd6_na_input(m, sizeof(struct ip6_hdr), icmp6len);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 8:40 AM (1 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28468586
Default Alt Text
D28647.id83973.diff (3 KB)
Attached To
Mode
D28647: Enforce net epoch in in6_selectsrc().
Attached
Detach File
Event Timeline
Log In to Comment