Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107287256
D31861.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
D31861.diff
View Options
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -88,6 +88,12 @@
&VNET_NAME(nosameprefix), 0,
"Refuse to create same prefixes on different interfaces");
+VNET_DEFINE_STATIC(bool, broadcast_lowest);
+#define V_broadcast_lowest VNET(broadcast_lowest)
+SYSCTL_BOOL(_net_inet_ip, OID_AUTO, broadcast_lowest, CTLFLAG_VNET | CTLFLAG_RW,
+ &VNET_NAME(broadcast_lowest), 0,
+ "Treat lowest address on a subnet (host 0) as broadcast");
+
VNET_DECLARE(struct inpcbinfo, ripcbinfo);
#define V_ripcbinfo VNET(ripcbinfo)
@@ -1170,10 +1176,10 @@
return ((in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
/*
- * Check for old-style (host 0) broadcast, but
+ * Optionally check for old-style (host 0) broadcast, but
* taking into account that RFC 3021 obsoletes it.
*/
- (ia->ia_subnetmask != IN_RFC3021_MASK &&
+ (V_broadcast_lowest && ia->ia_subnetmask != IN_RFC3021_MASK &&
ntohl(in.s_addr) == ia->ia_subnet)) &&
/*
* Check for an all one subnetmask. These
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 12:39 AM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15774277
Default Alt Text
D31861.diff (1 KB)
Attached To
Mode
D31861: Change lowest address on subnet (host 0) not to broadcast by default.
Attached
Detach File
Event Timeline
Log In to Comment