Bug 7535
Summary: | ARP notifications to NETLINK_ROUTE | ||
---|---|---|---|
Product: | Networking | Reporter: | lyricsfan |
Component: | IPV4 | Assignee: | Stephen Hemminger (stephen) |
Status: | REJECTED UNREPRODUCIBLE | ||
Severity: | normal | CC: | bunk |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.16, 2.6.17 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
Demo of how to receive neighbor events
netlink library netlink library header |
Description
lyricsfan
2006-11-16 01:09:58 UTC
On Thu, 16 Nov 2006 01:11:20 -0800 bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=7535 > > Summary: ARP notifications to NETLINK_ROUTE > Kernel Version: 2.6.16, 2.6.17 > Status: NEW > Severity: normal > Owner: shemminger@osdl.org > Submitter: lyricsfan@lycos.com > > > Most recent kernel where this bug did *NOT* occur: > 2.6.8 (maybe also some later version, but < 2.6.16) > > Distribution: > ubuntu 6.06 desktop/server (also with standard kernel 2.6.16), knoppix 5.0.1 > (kernel 2.6.17) > > Hardware Environment: > irrelevant > > Software Environment: > irrelevant > > Problem Description: > While listening to the multicast group RTMGRP_NEIGH on a NETLINK_ROUTE socket, > on kernel 2.6.8 a RTM_NEWNEIGH message is received whenever an entry is added or > deleted to the ARP table. On 2.6.16, no such message is received, except for > IPv6 events. > Setting "/proc/sys/net/ipv4/neigh/*/app_solicit" to a value > 0 doesn't solve > the problem. > > Steps to reproduce: > Open a NETLINK_ROUTE socket and listen to RTMGRP_NEIGH. Try to add a new entry > to the ARP table, either manually or by pinging a neighbour on the same subnet. > Try also to manually delete an entry, or simply let it expire. No RTM_NEWNEIGH > message is triggered when any of these events occurs (it IS in kernel 2.6.8). > Did you forget to set CONFIG_ARPD? Unless kernel is configured to support ARP daemon, no notification happens. I had already compiled with ARPD set, but I found out this was not enough. I think the problem arises in net/core/neighbour.c. Two times, in functions neigh_update() and neigh_timer_handler(), just inside a #ifdef CONFIG_ARPD ... #endif block, there's the check (line 823 and 1056, in my case) if (notify && neigh->parms->app_probes) after which neigh_app_notify() is called. This last function triggers the message over the netlink socket. To make it work, I couldn't find anything better than comment the check on app_probes. I also found out that the 2.6.8 kernel I previously tested presents the same adjustment... I tried to trace changes to the app_probes value, but maybe someone with a deeper knowledge of the code can help. I use a kernel patched with MIPL 2.0.2 (Mobile IP for Linux), but this doesn't appear to be an issue. Created attachment 10062 [details]
Demo of how to receive neighbor events
Extracted netlink code from arpd source and made a demo program.
Running on 2.6.20-rc4 this code correctly receives neighbor events.
Created attachment 10063 [details]
netlink library
netlink library from iproute2 source
Created attachment 10064 [details]
netlink library header
See attached program, this is not a kernel problem. The existing netlink interface works in the manner arpd expects. |