Message ID | 20091208192046.GA5649@midget.suse.cz |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
From: Jiri Bohac <jbohac@suse.cz> Date: Tue, 8 Dec 2009 20:20:46 +0100 > Is there any reason why inet6_addr_del needs to sets how=1 and > disable IPv6 even more than "ifconfig down" does? All I can say is that this behavior is definitely on purpose, although I don't exactly remember why. And although it helps you, it could also break things for other people who expect the current behavior. Some people definitely expect no IPV6 at all in any way shape or form if they have not assigned IPV6 addresses to an interface. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Dec 08, 2009 at 12:56:11PM -0800, David Miller wrote: > From: Jiri Bohac <jbohac@suse.cz> > > Is there any reason why inet6_addr_del needs to sets how=1 and > > disable IPv6 even more than "ifconfig down" does? > > All I can say is that this behavior is definitely on purpose, although > I don't exactly remember why. > Some people definitely expect no IPV6 at all in any way shape or > form if they have not assigned IPV6 addresses to an interface. Sure, even with how=0, IPv6 is about as much disabled as when the interface is down. The problem is that the current behaviour goes like this: #1 modprobe driver_for_eth0 #2 sysctl net.ipv6.conf.tun0.aaaaaaa=b #3 ip link set up dev eth0 #4 ip addr add xxx/yy dev eth0 #5 ip addr flush dev eth0 #6 ip link set down dev eth0 #7 ip link set up dev eth0 #5 turns IPv6 off even deeper that it was after #1, losing the settings made in #2. To re-configure the settings from #2, you need to do: #6, #7, [#6 again for some sysctl settings], #2 I think it would probably be ok for #5 to turn off IPv6 to the state you get with #6. Thanks,
Hello. Well, AFAIK, it is basically ancient thing. Some (rather new) paramters are exactly related bringing up each interface. Such parameters should be set _before_ it is brought up. For now, people can do this using the "default" value. We might have rtnetlink interface for up/down interface, allowing userspace to send related parameters as well. Regards, --yoshfuji David Miller wrote: > From: Jiri Bohac <jbohac@suse.cz> > Date: Tue, 8 Dec 2009 20:20:46 +0100 > >> Is there any reason why inet6_addr_del needs to sets how=1 and >> disable IPv6 even more than "ifconfig down" does? > > All I can say is that this behavior is definitely on purpose, although > I don't exactly remember why. > > And although it helps you, it could also break things for other people > who expect the current behavior. > > Some people definitely expect no IPV6 at all in any way shape or > form if they have not assigned IPV6 addresses to an interface. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Date: Wed, 09 Dec 2009 16:39:15 +0900 > Well, AFAIK, it is basically ancient thing. > Some (rather new) paramters are exactly related bringing > up each interface. > > Such parameters should be set _before_ it is brought up. > For now, people can do this using the "default" value. I think we should retain inet6 device private structure after we allocate it the first time that an ipv6 action occurs for the device, exactly so that settings made earlier can be retained. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2185,7 +2185,7 @@ static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx, disable IPv6 on this interface. */ if (idev->addr_list == NULL) - addrconf_ifdown(idev->dev, 1); + addrconf_ifdown(idev->dev, 0); return 0; } }