All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Kirch <okir@suse.de>
To: netdev@oss.sgi.com
Subject: Re: ip addr flush hangs
Date: Tue, 9 Mar 2004 16:07:30 +0100	[thread overview]
Message-ID: <20040309150730.GE14419@suse.de> (raw)
In-Reply-To: <20040309144824.GD14419@suse.de>

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

On Tue, Mar 09, 2004 at 03:48:24PM +0100, Olaf Kirch wrote:
> This is not entirely consistent. Should a NETDEV_DOWN zap the
> ipv6 configuration completely?

Sorry to follow up on my own mail...

Cross-checking ipv4, I can see that it behaves the same way as IPv6
(i.e. NETDEV_DOWN partly leaves the interface configuration intact).
The difference though is that dump_ifaddr doesn't include multicast
addresses in its report.

The attached patch disables reporting of multicast and anycast
addresses in inet6_dump_ifaddr

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

[-- Attachment #2: ipv6-netdev-down --]
[-- Type: text/plain, Size: 742 bytes --]

--- linux-2.6.3/net/ipv6/addrconf.c.orig	2004-03-09 15:46:33.000000000 +0100
+++ linux-2.6.3/net/ipv6/addrconf.c	2004-03-09 16:04:54.000000000 +0100
@@ -2898,6 +2898,11 @@ static int inet6_dump_ifaddr(struct sk_b
 				goto done;
 		}
 #endif
+		/* You can't delete these via RTM_DELADDR, so we shouldn't
+		 * display them here. Otherwise "ip addr flush" will loop
+		 * forever trying to delete ff02::1 etc.
+		 * 				--okir */
+#if 0
 		/* multicast address */
 		for (ifmca = idev->mc_list; ifmca; 
 		     ifmca = ifmca->next, ip_idx++) {
@@ -2918,6 +2923,7 @@ static int inet6_dump_ifaddr(struct sk_b
 			    cb->nlh->nlmsg_seq, RTM_NEWADDR)) <= 0) 
 				goto done;
 		}
+#endif
 		read_unlock_bh(&idev->lock);
 		in6_dev_put(idev);
 	}

  reply	other threads:[~2004-03-09 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-09 14:48 ip addr flush hangs Olaf Kirch
2004-03-09 15:07 ` Olaf Kirch [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040309150730.GE14419@suse.de \
    --to=okir@suse.de \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.