netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org,
	aviad.yehezkel5@gmail.com,
	YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [Bugme-new] [Bug 9440] New: Problem in joinning a socket to ipv6 multicast address in specific scenario
Date: Fri, 30 Nov 2007 15:25:16 +0300	[thread overview]
Message-ID: <20071130122516.GA28027@2ka.mipt.ru> (raw)
In-Reply-To: <20071130120219.GA26848@gondor.apana.org.au>

On Fri, Nov 30, 2007 at 11:02:19PM +1100, Herbert Xu (herbert@gondor.apana.org.au) wrote:
> OK, this looks like a good change.  However, we should also
> change NETDEV_UP as well to recreate idev if it isn't there
> and the MTU is big enough.

Ok, added netdev_up too.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 567664e..e8c3475 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2293,6 +2293,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 				break;
 			}
 
+			if (!idev && dev->mtu >= IPV6_MIN_MTU)
+				idev = ipv6_add_dev(dev);
+
 			if (idev)
 				idev->if_flags |= IF_READY;
 		} else {
@@ -2357,12 +2360,18 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 		break;
 
 	case NETDEV_CHANGEMTU:
-		if ( idev && dev->mtu >= IPV6_MIN_MTU) {
+		if (idev && dev->mtu >= IPV6_MIN_MTU) {
 			rt6_mtu_change(dev, dev->mtu);
 			idev->cnf.mtu6 = dev->mtu;
 			break;
 		}
 
+		if (!idev && dev->mtu >= IPV6_MIN_MTU) {
+			idev = ipv6_add_dev(dev);
+			if (idev)
+				break;
+		}
+
 		/* MTU falled under IPV6_MIN_MTU. Stop IPv6 on this interface. */
 
 	case NETDEV_DOWN:

-- 
	Evgeniy Polyakov

  reply	other threads:[~2007-11-30 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-9440-10286@http.bugzilla.kernel.org/>
2007-11-23  1:23 ` [Bugme-new] [Bug 9440] New: Problem in joinning a socket to ipv6 multicast address in specific scenario Andrew Morton
2007-11-23 10:59   ` Evgeniy Polyakov
2007-11-28 11:18     ` Evgeniy Polyakov
2007-11-30 12:02       ` Herbert Xu
2007-11-30 12:25         ` Evgeniy Polyakov [this message]
2007-11-30 12:36           ` Herbert Xu

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=20071130122516.GA28027@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=akpm@linux-foundation.org \
    --cc=aviad.yehezkel5@gmail.com \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /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 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).