lwip/dhcp: clear IP address information when dhcp_stop
authorChangsoon Kim <cs0424.kim@samsung.com>
Wed, 30 Nov 2016 16:43:45 +0000 (01:43 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Mon, 17 Apr 2017 10:08:14 +0000 (19:08 +0900)
It fixed to clear IP address, gateway, netmask infomation in dhcp_stop.

Change-Id: I16364415dd5f88ac63676acec2427784af015459
Signed-off-by: Changsoon Kim <cs0424.kim@samsung.com>
os/net/lwip/src/core/dhcp.c

index 1823a10..43f370b 100644 (file)
@@ -1211,6 +1211,10 @@ void dhcp_stop(struct netif *netif)
                }
 #endif                                                 /* LWIP_DHCP_AUTOIP_COOP */
 
+               netif_set_ipaddr(netif, IP_ADDR_ANY);
+               netif_set_gw(netif, IP_ADDR_ANY);
+               netif_set_netmask(netif, IP_ADDR_ANY);
+
                if (dhcp->pcb != NULL) {
                        udp_remove(dhcp->pcb);
                        dhcp->pcb = NULL;