All of lore.kernel.org
 help / color / mirror / Atom feed
* restoring IP multicast addresses when restarting the interface.
@ 2012-04-21  0:25 Flavio Leitner
  2012-04-23 12:14 ` Herbert Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Flavio Leitner @ 2012-04-21  0:25 UTC (permalink / raw)
  To: netdev; +Cc: Herbert Xu


Hello folks,

I was told that ntp in multicast mode was not working if you
restart the interface (ifdown <iface> ; ifup <iface) on an
older kernel.

It seemed obvious to me, but when I tried to reproduce this
upstream (last kernel of today), I noticed that the kernel
does restore the previous added multicast addresses. Therefore,
there is no issues.

I found that this is due to mainly this commit below which
doesn't remove idev when the addresses are deleted.

commit 6363097cc4d182f93788131b5d8f72aa91d950a0
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Thu Jun 7 18:35:38 2007 -0700

    [IPV4]: Do not remove idev when addresses are cleared
    
    Now that we create idev before addresses are added, it no longer makes
    sense to remove them when addresses are all deleted.
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>


Although the new behavior seems nice and save some user space
work, I think it was unintentional and likely to be a bug.

What you guys think?

thanks,
fbl

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

* Re: restoring IP multicast addresses when restarting the interface.
  2012-04-21  0:25 restoring IP multicast addresses when restarting the interface Flavio Leitner
@ 2012-04-23 12:14 ` Herbert Xu
  2012-04-24 18:30   ` Flavio Leitner
  0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2012-04-23 12:14 UTC (permalink / raw)
  To: Flavio Leitner; +Cc: netdev

On Fri, Apr 20, 2012 at 09:25:33PM -0300, Flavio Leitner wrote:
>
> Although the new behavior seems nice and save some user space
> work, I think it was unintentional and likely to be a bug.
> 
> What you guys think?

Are you talking about multicast subscriptions on the interface?

I don't see why they should disappear when the interface goes
down and then comes back up since these ultimately come from
application sockets which continue to exist after a down/up.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: restoring IP multicast addresses when restarting the interface.
  2012-04-23 12:14 ` Herbert Xu
@ 2012-04-24 18:30   ` Flavio Leitner
  2012-04-24 21:00     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Flavio Leitner @ 2012-04-24 18:30 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev, David Miller

On Mon, 23 Apr 2012 22:14:25 +1000
Herbert Xu <herbert@gondor.hengli.com.au> wrote:

> On Fri, Apr 20, 2012 at 09:25:33PM -0300, Flavio Leitner wrote:
> >
> > Although the new behavior seems nice and save some user space
> > work, I think it was unintentional and likely to be a bug.
> > 
> > What you guys think?
> 
> Are you talking about multicast subscriptions on the interface?
 
Yes.

> I don't see why they should disappear when the interface goes
> down and then comes back up since these ultimately come from
> application sockets which continue to exist after a down/up.

Yeah, but that's not how things used to work before, so my
question is if the kernel should be responsible for keeping
the subscription or the application.

If the admin puts down the interface and remove the module,
for instance, then the multicast subscription is gone.
Should the application monitor for that then?

David? Any thoughts?

thanks,
fbl

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

* Re: restoring IP multicast addresses when restarting the interface.
  2012-04-24 18:30   ` Flavio Leitner
@ 2012-04-24 21:00     ` David Miller
  2012-04-24 21:28       ` David Stevens
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2012-04-24 21:00 UTC (permalink / raw)
  To: fbl; +Cc: herbert, netdev

From: Flavio Leitner <fbl@redhat.com>
Date: Tue, 24 Apr 2012 15:30:23 -0300

> On Mon, 23 Apr 2012 22:14:25 +1000
> Herbert Xu <herbert@gondor.hengli.com.au> wrote:
> 
>> On Fri, Apr 20, 2012 at 09:25:33PM -0300, Flavio Leitner wrote:
>> >
>> > Although the new behavior seems nice and save some user space
>> > work, I think it was unintentional and likely to be a bug.
>> > 
>> > What you guys think?
>> 
>> Are you talking about multicast subscriptions on the interface?
>  
> Yes.
> 
>> I don't see why they should disappear when the interface goes
>> down and then comes back up since these ultimately come from
>> application sockets which continue to exist after a down/up.
> 
> Yeah, but that's not how things used to work before, so my
> question is if the kernel should be responsible for keeping
> the subscription or the application.
> 
> If the admin puts down the interface and remove the module,
> for instance, then the multicast subscription is gone.
> Should the application monitor for that then?
> 
> David? Any thoughts?

David Stevens at IBM and Herbert at the current multicast
experts, so I will defer to them.

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

* Re: restoring IP multicast addresses when restarting the interface.
  2012-04-24 21:00     ` David Miller
@ 2012-04-24 21:28       ` David Stevens
  2012-04-24 22:19         ` Flavio Leitner
  0 siblings, 1 reply; 6+ messages in thread
From: David Stevens @ 2012-04-24 21:28 UTC (permalink / raw)
  To: David Miller; +Cc: fbl, herbert, netdev, netdev-owner

netdev-owner@vger.kernel.org wrote on 04/24/2012 02:00:04 PM:

> From: David Miller <davem@davemloft.net>

> >> I don't see why they should disappear when the interface goes
> >> down and then comes back up since these ultimately come from
> >> application sockets which continue to exist after a down/up.
> > 
> > Yeah, but that's not how things used to work before, so my
> > question is if the kernel should be responsible for keeping
> > the subscription or the application.
> > 
> > If the admin puts down the interface and remove the module,
> > for instance, then the multicast subscription is gone.
> > Should the application monitor for that then?
> > 
> > David? Any thoughts?
> 
> David Stevens at IBM and Herbert at the current multicast
> experts, so I will defer to them.

I think restoring the hardware multicast filter on device up
is useful, desirable and not a bug. :-)

                                                +-DLS

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

* Re: restoring IP multicast addresses when restarting the interface.
  2012-04-24 21:28       ` David Stevens
@ 2012-04-24 22:19         ` Flavio Leitner
  0 siblings, 0 replies; 6+ messages in thread
From: Flavio Leitner @ 2012-04-24 22:19 UTC (permalink / raw)
  To: David Stevens; +Cc: David Miller, herbert, netdev

On Tue, 24 Apr 2012 14:28:33 -0700
David Stevens <dlstevens@us.ibm.com> wrote:

> netdev-owner@vger.kernel.org wrote on 04/24/2012 02:00:04 PM:
> 
> > From: David Miller <davem@davemloft.net>
> 
> > >> I don't see why they should disappear when the interface goes
> > >> down and then comes back up since these ultimately come from
> > >> application sockets which continue to exist after a down/up.
> > > 
> > > Yeah, but that's not how things used to work before, so my
> > > question is if the kernel should be responsible for keeping
> > > the subscription or the application.
> > > 
> > > If the admin puts down the interface and remove the module,
> > > for instance, then the multicast subscription is gone.
> > > Should the application monitor for that then?
> > > 
> > > David? Any thoughts?
> > 
> > David Stevens at IBM and Herbert at the current multicast
> > experts, so I will defer to them.
> 
> I think restoring the hardware multicast filter on device up
> is useful, desirable and not a bug. :-)

Alright, thanks everyone!
fbl

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

end of thread, other threads:[~2012-04-24 22:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21  0:25 restoring IP multicast addresses when restarting the interface Flavio Leitner
2012-04-23 12:14 ` Herbert Xu
2012-04-24 18:30   ` Flavio Leitner
2012-04-24 21:00     ` David Miller
2012-04-24 21:28       ` David Stevens
2012-04-24 22:19         ` Flavio Leitner

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.