Bug 7535 - ARP notifications to NETLINK_ROUTE
Summary: ARP notifications to NETLINK_ROUTE
Status: REJECTED UNREPRODUCIBLE
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-16 01:09 UTC by lyricsfan
Modified: 2007-01-12 15:46 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.16, 2.6.17
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Demo of how to receive neighbor events (3.89 KB, text/x-csrc)
2007-01-12 15:44 UTC, Stephen Hemminger
Details
netlink library (13.11 KB, text/x-csrc)
2007-01-12 15:45 UTC, Stephen Hemminger
Details
netlink library header (2.07 KB, text/x-chdr)
2007-01-12 15:45 UTC, Stephen Hemminger
Details

Description lyricsfan 2006-11-16 01:09:58 UTC
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).
Comment 1 Andrew Morton 2006-11-16 01:19:22 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).
> 

Comment 2 Stephen Hemminger 2006-11-16 10:04:37 UTC
Did you forget to set CONFIG_ARPD?
Unless kernel is configured to support ARP daemon, no notification happens.
Comment 3 lyricsfan 2006-11-20 01:50:13 UTC
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.
Comment 4 Stephen Hemminger 2007-01-12 15:44:17 UTC
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.
Comment 5 Stephen Hemminger 2007-01-12 15:45:10 UTC
Created attachment 10063 [details]
netlink library 

netlink library from iproute2 source
Comment 6 Stephen Hemminger 2007-01-12 15:45:33 UTC
Created attachment 10064 [details]
netlink library header
Comment 7 Stephen Hemminger 2007-01-12 15:46:48 UTC
See attached program, this is not a kernel problem.  The existing netlink
interface works in the manner arpd expects.

Note You need to log in before you can comment on or make changes to this bug.