Browse Source

In netif_add() fixed clearing of ip_addr, netmask, gw and flags.

STABLE-2_1_x
christiaans 20 years ago
parent
commit
5a6b26d69e
  1. 3
      CHANGELOG
  2. 7
      src/core/netif.c

3
CHANGELOG

@ -63,6 +63,9 @@ HISTORY
++ Bug fixes:
2006-11-28 Christiaan Simons
* netif.c: In netif_add() fixed missing clear of ip_addr, netmask, gw and flags.
2006-10-11 Christiaan Simons
* api_lib.c etharp.c, ip.c, memp.c, stats.c, sys.{c,h} tcp.h:
Partially accepted patch #5449 for ANSI C compatibility / build fixes.

7
src/core/netif.c

@ -69,7 +69,12 @@ netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask,
err_t (* input)(struct pbuf *p, struct netif *netif))
{
static s16_t netifnum = 0;
/* reset new interface configuration state */
netif->ip_addr.addr = 0;
netif->netmask.addr = 0;
netif->gw.addr = 0;
netif->flags = 0;
#if LWIP_DHCP
/* netif not under DHCP control by default */
netif->dhcp = NULL;

Loading…
Cancel
Save