Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107901663
D45570.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
687 B
Referenced Files
None
Subscribers
None
D45570.diff
View Options
diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c
--- a/sbin/ifconfig/af_inet.c
+++ b/sbin/ifconfig/af_inet.c
@@ -440,7 +440,7 @@
static void
in_setdefaultmask_nl(void)
{
- struct in_px *px = sintab_nl[ADDR];
+ struct in_px *px = sintab_nl[ADDR];
in_addr_t i = ntohl(px->addr.s_addr);
@@ -451,11 +451,11 @@
* we should return an error rather than warning.
*/
if (IN_CLASSA(i))
- px->plen = IN_CLASSA_NSHIFT;
+ px->plen = 32 - IN_CLASSA_NSHIFT;
else if (IN_CLASSB(i))
- px->plen = IN_CLASSB_NSHIFT;
+ px->plen = 32 - IN_CLASSB_NSHIFT;
else
- px->plen = IN_CLASSC_NSHIFT;
+ px->plen = 32 - IN_CLASSC_NSHIFT;
px->maskset = true;
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 4:50 AM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15974568
Default Alt Text
D45570.diff (687 B)
Attached To
Mode
D45570: ifconfig: Fix default netmask calculation
Attached
Detach File
Event Timeline
Log In to Comment