netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netlink NETLINK_ROUTE  failure & Can the kernel really handle IPv6 properly
@ 2014-10-01 20:28 Ulf Samuelsson
  2014-10-01 21:30 ` Hannes Frederic Sowa
  2014-10-06  3:35 ` Gao feng
  0 siblings, 2 replies; 9+ messages in thread
From: Ulf Samuelsson @ 2014-10-01 20:28 UTC (permalink / raw)
  To: Linux Netdev List


Trying to write a kernel module handing NETLINK_ROUTE messages for a 
3.4.x kernel.

After building the module, it fails to load on my PowerPC P2020 target.
Reason is that the "netlink_kernel_create" fails.



---------------------------------------
struct *sock    nls;

...
static int __init my_init (...)
{
     ...
     nls = netlink_kernel_create( &init_net, NETLINK_ROUTE, 0, my_rcv, 
NULL, THIS_MODULE);
     if (!nls) {
             return -ENOMEM;
     }
...
}
----------------------------------------
netlick_kernel_create returns 0, so the kernel module fails.

Is there anything wrong wth the call to netlink_kernel_create ?

Goggling show that some code uses "__net_init".
Not sure what that means.

Other code uses a mutex, instead of NULL.
Does NETLINK_ROUTE require a mutex?

All ideas are welcome-

==============
BTW, the problem I am trying to solve is how to connect to an I/F with 
an IPv6 link-local address.

An existing kernel module waits for a NETDEV_UP event, and then tries to 
communicate
with the link-local address.

This will fail, because (according to a colleague) the I/F enters a 
"tentative" state,
where it is trying to decide if it is unique or not.
It will remain in that state for 1-2 seconds, and only afterwards is the 
link-local address
available for normal use.

The guys writing the module, claim that the kernel is using NETDEV_UP.
There is very little code in the kernel using NETLINK_ROUTE, even in 
latest stable.
It is using NETDEV_UP.

If my colleague is right, the kernel really cannot handle IPv6 
link-local addresses properly.

-- 
Best Regards
Ulf Samuelsson

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-06 11:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 20:28 netlink NETLINK_ROUTE failure & Can the kernel really handle IPv6 properly Ulf Samuelsson
2014-10-01 21:30 ` Hannes Frederic Sowa
2014-10-02 12:38   ` Ulf samuelsson
2014-10-02 15:44     ` Dan Williams
2014-10-03  5:59       ` Ulf Samuelsson
2014-10-03  7:59       ` Ulf Samuelsson
2014-10-03 18:49         ` David Miller
2014-10-06 11:25           ` Ulf Samuelsson
2014-10-06  3:35 ` Gao feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).