kernel-aes67/net/atm
Simon Kelley bd89efc532 [NEIGH]: Fix IP-over-ATM and ARP interaction.
The classical IP over ATM code maintains its own IPv4 <-> <ATM stuff>
ARP table, using the standard neighbour-table code. The
neigh_table_init function adds this neighbour table to a linked list
of all neighbor tables which is used by the functions neigh_delete()
neigh_add() and neightbl_set(), all called by the netlink code.

Once the ATM neighbour table is added to the list, there are two
tables with family == AF_INET there, and ARP entries sent via netlink
go into the first table with matching family. This is indeterminate
and often wrong.

To see the bug, on a kernel with CLIP enabled, create a standard IPv4
ARP entry by pinging an unused address on a local subnet. Then attempt
to complete that entry by doing

ip neigh replace <ip address> lladdr <some mac address> nud reachable

Looking at the ARP tables by using 

ip neigh show

will reveal two ARP entries for the same address. One of these can be
found in /proc/net/arp, and the other in /proc/net/atm/arp.

This patch adds a new function, neigh_table_init_no_netlink() which
does everything the neigh_table_init() does, except add the table to
the netlink all-arp-tables chain. In addition neigh_table_init() has a
check that all tables on the chain have a distinct address family.
The init call in clip.c is changed to call
neigh_table_init_no_netlink().

Since ATM ARP tables are rather more complicated than can currently be
handled by the available rtattrs in the netlink protocol, no
functionality is lost by this patch, and non-ATM ARP manipulation via
netlink is rescued. A more complete solution would involve a rtattr
for ATM ARP entries and some way for the netlink code to give
neigh_add and friends more information than just address family with
which to find the correct ARP table.

[ I've changed the assertion checking in neigh_table_init() to not
  use BUG_ON() while holding neigh_tbl_lock.  Instead we remember that
  we found an existing tbl with the same family, and after dropping
  the lock we'll give a diagnostic kernel log message and a stack dump.
  -DaveM ]

Signed-off-by: Simon Kelley <simon@thekelleys.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-12 14:56:08 -07:00
..
addr.c [ATM]: add support for LECS addresses learned from network 2005-10-06 22:19:28 -07:00
addr.h [ATM]: add support for LECS addresses learned from network 2005-10-06 22:19:28 -07:00
atm_misc.c [ATM]: atm_pcr_goal() doesn't modify its argument's contents -- mark it as const 2005-11-29 16:13:55 -08:00
br2684.c [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
clip.c [NEIGH]: Fix IP-over-ATM and ARP interaction. 2006-05-12 14:56:08 -07:00
common.c [NET]: sem2mutex part 2 2006-03-20 22:35:41 -08:00
common.h [ATM]: deregistration removes device from atm_devs list immediately 2005-11-29 16:16:41 -08:00
ioctl.c [NET] sem2mutex: net/ 2006-03-20 22:33:17 -08:00
ipcommon.c [NET]: Kill skb->list 2005-08-29 15:31:14 -07:00
ipcommon.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [ATM]: Trivial spelling fix patch for net/Kconfig 2005-07-19 13:56:53 -07:00
lec_arpc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
lec.c [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
lec.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpc.c [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
mpc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpoa_caches.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpoa_caches.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpoa_proc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pppoatm.c [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
proc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
protocols.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pvc.c [NET]: move struct proto_ops to const 2006-01-03 13:11:15 -08:00
raw.c [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
resources.c [NET]: sem2mutex part 2 2006-03-20 22:35:41 -08:00
resources.h [NET]: sem2mutex part 2 2006-03-20 22:35:41 -08:00
signaling.c [ATM]: keep atmsvc failure messages quiet 2006-03-04 21:06:25 -08:00
signaling.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
svc.c [NET]: move struct proto_ops to const 2006-01-03 13:11:15 -08:00