Subject: Re: ip addr flush hangs

From: Olaf Kirch <[email-masked]>
Date: Tue, 9 Mar 2004 20:47:56 +0100

On Tue, Mar 09, 2004 at 11:25:29AM -0800, David S. Miller wrote:
> > The attached patch disables reporting of multicast and anycast
> > addresses in inet6_dump_ifaddr
> 
> Better to fix /sbin/ip, Andi Kleen posted a patch for that tool
> in a thread on linux-kernel about this very issue.

His patch breaks ip addr flush completely, because it breaks the loop
before flushing the RTM_DELADDR packet to the netlink socket.

Even if you fix it to break out ofthe loop in the proper place, it is
still not entirely correct.  ip does addr list and addr flush in a loop,
because netlink can return only so many addresses in one packet. If you
break out of the loop unconditionally, as Andi does in his patch, you
break ip addr list/flush for systems with more than the normal number
of addresses per device.

I think IPv6 is really wrong in reporting multicast addresses via
RTM_GETADDR. IPv4 doesn't do this either.

Olaf
-- 
Olaf Kirch     |  Stop wasting entropy - start using predictable
[email-masked]   |  tempfile names today!
---------------+