Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I am using a application which runs in kernel as kernel module. This kernel module creates netdevice in the stack. During runtime this netdevice is made if flag UP and DOWN. When this netdevice is made UP, my kernel module need to know the ipv6 link local address learnt on this netdevice. For this my kernel module register a callback for stack notifications using register_inet6addr_notifier. In my callback I listen for NETDEV_UP and NETDEV_DOWN notifications. On NETDEV_UP notification I check the ip address received as argument of callback function. and if it is link local address I try to use this. But looks it is not usable for another 1-2 sec. I can use it successfully after 1-2 sec.
Can anybody let me know which notification, and how, I should listen from kernel module to know that link local address is now usable.
because sendmsg call returns with "Invalid argument". And if sendmsg is retried after 1-2 sec then it works fine. I can see following content in the RFC 4862. I feel that when stack notify the link local address to application using NET_DEVUP, it is in the tentative state and so not usable.
####
tentative address - an address whose uniqueness on a link is being verified, prior to its assignment to an interface. A tentative address is not considered assigned to an interface in the usual sense. An interface discards received packets addressed to a tentative address, but accepts Neighbor Discovery packets related to Duplicate Address Detection for the tentative address
####
An address is considered unique if none of the tests indicate the presence of a duplicate address within RetransTimer milliseconds after having sent DupAddrDetectTransmits Neighbor Solicitations. Once an address is determined to be unique, it may be assigned to an interface.
####
Will NETDEV_CHANGE be received only for link local address ready? Or it is received for some other link changes also? How to know that it is received for link local address ready?
I tested and found that when I do the netdev up then NETDEV_CHANGE is not received in the callback. This callback I registered with kernel using register_inet6addr_notifier. Although NETDEV_UP (for dev up) and NETDEV_DOWN (for dev down) are received.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.