netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ip addr flush hangs
@ 2004-03-09 14:48 Olaf Kirch
  2004-03-09 15:07 ` Olaf Kirch
  0 siblings, 1 reply; 11+ messages in thread
From: Olaf Kirch @ 2004-03-09 14:48 UTC (permalink / raw)
  To: netdev

Hi,

I'm currently debugging the following problem: on a 2.6.3
kernel, when doing this

	ifconfig eth0 down
	ip addr flush dev eth0

The second command hangs indefinitely. The reason is that the kernel
reports ipv6-all-hosts (ff02::1) when dumping all addresses, but
RTM_DELADDR on ff02::1 doesn't do anything. As /sbin/ip will loop until
the kernel reports no more matching addresses, it will go on like that
forever.

I don't see an obvious fix to this issue. On one hand, calling ifconfig
down will result in a call to addrconf_ifdown(dev, 0).  This will clear
the list of unicast addresses assigned to this interface, but will not
clear the list of multicast addresses (it unloads them from the NIC,
and sends IGMP leave packets, but the list of addresses will remain
attached to the device). So it doesn't destroy the interface completely,
it zaps its state just partly, intentionally.

On the other hand, if you manually remove all addresses from the
interface, this will result in a call to addrconf_ifdown(dev, 1),
causing the mcast list to be zapped as well.

This is not entirely consistent. Should a NETDEV_DOWN zap the
ipv6 configuration completely?

Olaf
-- 
Olaf Kirch     |  Stop wasting entropy - start using predictable
okir@suse.de   |  tempfile names today!
---------------+ 

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

end of thread, other threads:[~2004-03-10  7:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-09 14:48 ip addr flush hangs Olaf Kirch
2004-03-09 15:07 ` Olaf Kirch
2004-03-09 19:25   ` David S. Miller
2004-03-09 19:44     ` Andi Kleen
2004-03-09 19:46       ` David S. Miller
2004-03-09 19:47     ` Olaf Kirch
2004-03-09 23:29   ` David S. Miller
2004-03-09 23:56     ` Shirley Ma
2004-03-10  0:06       ` David S. Miller
2004-03-10  3:32       ` YOSHIFUJI Hideaki / 吉藤英明
2004-03-10  7:59         ` Shirley Ma

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).