Skip to contentSkip to conversation

restoring IP multicast addresses when restarting the interface.

DISCUSSION Flavio Leitner 4 participants 6 messages Apr 21, 2012 – Apr 24, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
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.

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

#1 lore raw
Quoted 5 lines · Flavio Leitner

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,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 8 lines · On Mon, 23 Apr 2012 22:14:25 +1000 Herbert Xu <[email protected]>…
Quoted 5 lines · Flavio Leitner

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.

Quoted 3 lines

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

maintainer
#3 lore raw

From: Flavio Leitner <[email protected]>
Date: Tue, 24 Apr 2012 15:30:23 -0300

Quoted 22 lines
Quoted 8 lines · On Mon, 23 Apr 2012 22:14:25 +1000 Herbert Xu <[email protected]>…
Quoted 5 lines · Flavio Leitner

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.

Quoted 3 lines

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.

Quoted 5 lines

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.

#4 lore raw

[email protected] wrote on 04/24/2012 02:00:04 PM:

Quoted 10 lines

From: David Miller <[email protected]>

Quoted 8 lines
Quoted 3 lines

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.

Quoted 8 lines
Quoted 5 lines

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
#5 lore raw
Quoted 16 lines · On Tue, 24 Apr 2012 14:28:33 -0700 David Stevens <[email protected]> wrote:

[email protected] wrote on 04/24/2012 02:00:04 PM:

Quoted 14 lines

From: David Miller <[email protected]>

Quoted 12 lines
Quoted 3 lines

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?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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