fixed bug #34121 netif_add/netif_set_ipaddr fail on NULL ipaddr

This commit is contained in:
Simon Goldschmidt 2011-08-24 19:52:06 +02:00 committed by goldsimon
parent 626131fb28
commit be191148e0
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,9 @@ HISTORY
++ Bugfixes: ++ Bugfixes:
2011-08-24: Simon Goldschmidt
* netif.c: fixed bug #34121 netif_add/netif_set_ipaddr fail on NULL ipaddr
2011-08-22: Simon Goldschmidt 2011-08-22: Simon Goldschmidt
* tcp_out.c: fixed bug #33962 TF_FIN not always set after FIN is sent. (This * tcp_out.c: fixed bug #33962 TF_FIN not always set after FIN is sent. (This
merely prevents nagle from not transmitting fast after closing.) merely prevents nagle from not transmitting fast after closing.)

View File

@ -326,7 +326,7 @@ netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr)
struct tcp_pcb_listen *lpcb; struct tcp_pcb_listen *lpcb;
/* address is actually being changed? */ /* address is actually being changed? */
if ((ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) {
/* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */ /* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n"));
pcb = tcp_active_pcbs; pcb = tcp_active_pcbs;