Fixed bug #27390: Source IP check in ip_input() causes it to drop valid DHCP packets -> allow 0.0.0.0 as source address when LWIP_DHCP is enabled

This commit is contained in:
goldsimon 2009-10-16 12:39:24 +00:00
parent d9a5094068
commit d8d8cf7e98
2 changed files with 7 additions and 1 deletions

View File

@ -43,6 +43,11 @@ HISTORY
++ Bugfixes:
2009-10-16: Simon Goldschmidt
* ip.c: Fixed bug #27390: Source IP check in ip_input() causes it to drop
valid DHCP packets -> allow 0.0.0.0 as source address when LWIP_DHCP is
enabled
2009-10-15: Simon Goldschmidt (Oleg Tyshev)
* tcp_in.c: Fixed bug #27329: dupacks by unidirectional data transmit

View File

@ -321,7 +321,8 @@ ip_input(struct pbuf *p, struct netif *inp)
/* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */
#if LWIP_DHCP
if (check_ip_src)
/* DHCP servers need 0.0.0.0 to be allowed as source port (RFC 1.1.2.2: 3.2.1.3/a) */
if (check_ip_src && (iphdr->src.addr != 0))
#endif /* LWIP_DHCP */
{ if ((ip_addr_isbroadcast(&(iphdr->src), inp)) ||
(ip_addr_ismulticast(&(iphdr->src)))) {