If the peer gives us 0.0.0.0 as his IP number, NAK it rather than accepting

it as being in range.

  set ifaddr 1.2.3.4/0 5.6.7.8/0

no longer allows 0.0.0.0 as a valid IP.

Reported/tested by:	Bohdan Horst <nexus@hoth.amu.edu.pl>
MFC after:		3 days
This commit is contained in:
Brian Somers 2002-09-23 22:40:43 +00:00
parent 9acdabbe1e
commit 3c34956a21
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103875

View File

@ -1013,7 +1013,8 @@ ipcp_ValidateReq(struct ipcp *ipcp, struct in_addr ip, struct fsm_decode *dec)
}
return;
}
} else if (!ncprange_containsip4(&ipcp->cfg.peer_range, ip)) {
} else if (ip.s_addr == INADDR_ANY ||
!ncprange_containsip4(&ipcp->cfg.peer_range, ip)) {
/*
* If the destination address is not acceptable, NAK with what we
* want to use.