Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171203185
D28645.id83820.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
800 B
Referenced Files
None
Subscribers
None
D28645.id83820.diff
View Options
Index: sys/netinet/in.c
===================================================================
--- sys/netinet/in.c
+++ sys/netinet/in.c
@@ -413,17 +413,8 @@
ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr);
} else {
in_addr_t i = ntohl(addr->sin_addr.s_addr);
-
- /*
- * Be compatible with network classes, if netmask isn't
- * supplied, guess it based on classes.
- */
- if (IN_CLASSA(i))
- ia->ia_subnetmask = IN_CLASSA_NET;
- else if (IN_CLASSB(i))
- ia->ia_subnetmask = IN_CLASSB_NET;
- else
- ia->ia_subnetmask = IN_CLASSC_NET;
+ /* Assume host address if netmask is not specified */
+ ia->ia_subnetmask = INADDR_BROADCAST;
ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask);
}
ia->ia_subnet = ntohl(addr->sin_addr.s_addr) & ia->ia_subnetmask;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 10, 12:06 PM (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38645048
Default Alt Text
D28645.id83820.diff (800 B)
Attached To
Mode
D28645: Remove classful masks from interface addition code.
Attached
Detach File
Event Timeline
Log In to Comment