未验证 提交 c25f7cbf 编写于 作者: N nicedayzhu 提交者: GitHub

bugfix

[net][netdev] Update netdev->ip_addr&gw&netmask after registered.
上级 5a3cb253
......@@ -317,7 +317,10 @@ static int netdev_add(struct netif *lwip_netif)
rt_strncpy(name, lwip_netif->name, LWIP_NETIF_NAME_LEN);
result = netdev_register(netdev, name, (void *)lwip_netif);
netdev->ip_addr = lwip_netif->ip_addr;
netdev->gw = lwip_netif->gw;
netdev->netmask = lwip_netif->netmask;
#ifdef RT_LWIP_DHCP
netdev_low_level_set_dhcp_status(netdev, RT_TRUE);
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册