ip/ipconfig: treat /32 mask as /0
some dhcp servers send a mask of 255.255.255.255 to indicate the gateway is directly routeable. thanks to david du colombier for this patch.
This commit is contained in:
parent
469a10f1d9
commit
ee2d30984f
1 changed files with 2 additions and 0 deletions
|
@ -1233,6 +1233,8 @@ dhcprecv(void)
|
|||
if(!validip(conf.mask) || !Oflag){
|
||||
if(!optgetaddr(bp->optdata, OBmask, conf.mask))
|
||||
ipmove(conf.mask, IPnoaddr);
|
||||
if(ipcmp(conf.mask, IPv4bcast) == 0)
|
||||
ipmove(conf.mask, IPnoaddr);
|
||||
}
|
||||
DEBUG("ipaddr=%I ipmask=%M ", conf.laddr, conf.mask);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue