lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] netif_set_up & IPv6


From: Rahul Gundecha
Subject: [lwip-devel] netif_set_up & IPv6
Date: Thu, 6 Mar 2014 09:16:01 +0530

Hi all,

I have query about the function netif_set_up() which brings an interface up. Here is my understanding about this function.
This function is called from DHCP state machine inside lwip, or it should be called by netif driver while static IP address is configured.
Lets consider a scenario where a device is configured with DHCP, however for some reasons device do not get DHCP (IPv4) address. Irrespective of the success/failure with DHCP (IPv4), one wants to configure link local IPv6 address for an interface and start IPv6 traffic.

One can call netif_set_up() while configuring IPv6 address. However as struct netif is shared by IPv4 and IPv6 both, calling netif_set_up() wrongly assumes that both IPv4 and IPv6 address have been configured successfully - hence it starts sending different kinds of IPv4 (Gratuitous ARP, IGMP, SNMP, etc.) and IPv6 (MLD, RS,etc.) traffic.
Is there some other way of doing this task which I missing here.

Otherwise how about separating out the "NETIF_FLAG_UP" flag for IPv4 & IPv6? If either of IPv4 or IPv6 address is successfully configured then only the traffic pertaining to that address need to be activated.

Also I see NETIF_FLAG_UP is checked only in IPv6 specific functions and not used in IPv4 specific functions other than netif_set_down(). Is there any specific reason behind this.

Thanks,
Rahul

reply via email to

[Prev in Thread] Current Thread [Next in Thread]