Page MenuHomeFreeBSD

D24852.id71988.diff
No OneTemporary

D24852.id71988.diff

Index: tcp_usrreq.c
===================================================================
--- tcp_usrreq.c
+++ tcp_usrreq.c
@@ -552,6 +552,10 @@
if (sinp->sin_family == AF_INET
&& IN_MULTICAST(ntohl(sinp->sin_addr.s_addr)))
return (EAFNOSUPPORT);
+ if ((sinp->sin_family == AF_INET) &&
+ ((ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) ||
+ (sinp->sin_addr.s_addr == INADDR_ANY)))
+ return(EAFNOSUPPORT);
if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0)
return (error);
@@ -652,6 +656,11 @@
error = EAFNOSUPPORT;
goto out;
}
+ if ((ntohl(sin.sin_addr.s_addr) == INADDR_BROADCAST) ||
+ (sin.sin_addr.s_addr == INADDR_ANY)) {
+ error = EAFNOSUPPORT;
+ goto out;
+ }
if ((error = prison_remote_ip4(td->td_ucred,
&sin.sin_addr)) != 0)
goto out;
@@ -1024,6 +1033,13 @@
error = EAFNOSUPPORT;
goto out;
}
+ if ((ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) ||
+ (sinp->sin_addr.s_addr == INADDR_ANY)) {
+ if (m)
+ m_freem(m);
+ error = EAFNOSUPPORT;
+ goto out;
+ }
if ((error = prison_remote_ip4(td->td_ucred,
&sinp->sin_addr))) {
if (m)

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 6:58 AM (16 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14880673
Default Alt Text
D24852.id71988.diff (1 KB)

Event Timeline