[Bugfix]Update netdev info after registered
1.修复ifconfig命令无法正确显示IP,网关,掩码的问题 2.lwip_2.1.0,增加netdev->mtu = lwip_netif->mtu;
This commit is contained in:
parent
c8e1fbf673
commit
fe3ab4605d
|
@ -315,6 +315,7 @@ static int netdev_add(struct netif *lwip_netif)
|
||||||
|
|
||||||
/* Update netdev info after registered */
|
/* Update netdev info after registered */
|
||||||
netdev->flags = lwip_netif->flags;
|
netdev->flags = lwip_netif->flags;
|
||||||
|
netdev->mtu = lwip_netif->mtu;
|
||||||
netdev->ops = &lwip_netdev_ops;
|
netdev->ops = &lwip_netdev_ops;
|
||||||
netdev->hwaddr_len = lwip_netif->hwaddr_len;
|
netdev->hwaddr_len = lwip_netif->hwaddr_len;
|
||||||
rt_memcpy(netdev->hwaddr, lwip_netif->hwaddr, lwip_netif->hwaddr_len);
|
rt_memcpy(netdev->hwaddr, lwip_netif->hwaddr, lwip_netif->hwaddr_len);
|
||||||
|
|
Loading…
Reference in New Issue