Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137929093
D42084.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
D42084.diff
View Options
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -954,6 +954,7 @@
* This entire block sorely needs a rewrite.
*/
if (t != NULL &&
+ t->inp_socket != NULL &&
(so->so_type != SOCK_STREAM ||
ntohl(t->inp_faddr.s_addr) == INADDR_ANY) &&
(ntohl(sin->sin_addr.s_addr) != INADDR_ANY ||
@@ -966,7 +967,8 @@
}
t = in_pcblookup_local(pcbinfo, sin->sin_addr,
lport, lookupflags, cred);
- if (t != NULL && (reuseport & t->inp_socket->so_options) == 0 &&
+ if (t != NULL && t->inp_socket != NULL &&
+ (reuseport & t->inp_socket->so_options) == 0 &&
(reuseport_lb & t->inp_socket->so_options) == 0) {
#ifdef INET6
if (ntohl(sin->sin_addr.s_addr) !=
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
@@ -250,6 +250,7 @@
&sin6->sin6_addr, lport,
INPLOOKUP_WILDCARD, cred);
if (t != NULL &&
+ t->inp_socket != NULL &&
(so->so_type != SOCK_STREAM ||
IN6_IS_ADDR_UNSPECIFIED(&t->in6p_faddr)) &&
(!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) ||
@@ -281,7 +282,8 @@
}
t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr,
lport, lookupflags, cred);
- if (t && (reuseport & t->inp_socket->so_options) == 0 &&
+ if (t != NULL && t->inp_socket != NULL &&
+ (reuseport & t->inp_socket->so_options) == 0 &&
(reuseport_lb & t->inp_socket->so_options) == 0) {
return (EADDRINUSE);
}
@@ -293,7 +295,7 @@
in6_sin6_2_sin(&sin, sin6);
t = in_pcblookup_local(pcbinfo, sin.sin_addr,
lport, lookupflags, cred);
- if (t &&
+ if (t != NULL && t->inp_socket != NULL &&
(reuseport & t->inp_socket->so_options) == 0 &&
(reuseport_lb & t->inp_socket->so_options) == 0 &&
(ntohl(t->inp_laddr.s_addr) != INADDR_ANY ||
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 8:51 AM (9 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26279272
Default Alt Text
D42084.diff (1 KB)
Attached To
Mode
D42084: Improve handling of detached inps
Attached
Detach File
Event Timeline
Log In to Comment