Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-13 Thread Eric W. Biederman
YOSHIFUJI Hideaki / 吉藤英明 <[EMAIL PROTECTED]> writes: > In article <[EMAIL PROTECTED]> (at Mon, 12 Nov 2007 > 12:50:53 -0700), [EMAIL PROTECTED] (Eric W. Biederman) says: > >> My opinion is that both your analysis is slightly off (as to the cause >> of your problems) and that your approach to fix y

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-13 Thread Eric W. Biederman
David Miller <[EMAIL PROTECTED]> writes: Well this is a weird way to get to this part of the conversation. > From: "Denis V. Lunev" <[EMAIL PROTECTED]> > Date: Mon, 12 Nov 2007 19:49:03 +0300 > >> Unregister for a loopback in !init_net is a _valid_ operation and should >> be clean, i.e. without k

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-13 Thread Daniel Lezcano
Eric W. Biederman wrote: Daniel Lezcano <[EMAIL PROTECTED]> writes: Eric W. Biederman wrote: "Denis V. Lunev" <[EMAIL PROTECTED]> writes: Index: linux-2.6-netns/net/ipv6/addrconf.c === --- linux-2.6-netns.orig/net/ipv6/addrconf.

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread YOSHIFUJI Hideaki / 吉藤英明
In article <[EMAIL PROTECTED]> (at Mon, 12 Nov 2007 12:50:53 -0700), [EMAIL PROTECTED] (Eric W. Biederman) says: > My opinion is that both your analysis is slightly off (as to the cause > of your problems) and that your approach to fix your problem is wrong > because you don't untangle the knot y

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread David Miller
From: "Denis V. Lunev" <[EMAIL PROTECTED]> Date: Mon, 12 Nov 2007 19:49:03 +0300 > Unregister for a loopback in !init_net is a _valid_ operation and should > be clean, i.e. without kludges in the path. This is the only way to > check the ref-counting. For ipv6 the stack really wants to pin down t

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Denis V. Lunev
> Let me try to clarify: > > * when the init network namespace is created, the loopback is created > first, before ipv6, and the notifier call chain for ipv6 is not setup, > so the protocol does not receive the REGISTER event > > * when the init network namespace is destroyed during shutdown, t

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Eric W. Biederman
Daniel Lezcano <[EMAIL PROTECTED]> writes: > Eric W. Biederman wrote: >> "Denis V. Lunev" <[EMAIL PROTECTED]> writes: >> Index: linux-2.6-netns/net/ipv6/addrconf.c === --- linux-2.6-netns.orig/net/ipv6/addrconf.c +

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Daniel Lezcano
Eric W. Biederman wrote: "Denis V. Lunev" <[EMAIL PROTECTED]> writes: Index: linux-2.6-netns/net/ipv6/addrconf.c === --- linux-2.6-netns.orig/net/ipv6/addrconf.c +++ linux-2.6-netns/net/ipv6/addrconf.c @@ -2272,7 +2272,8 @@ static

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Eric W. Biederman
"Denis V. Lunev" <[EMAIL PROTECTED]> writes: >>> why should we care on down? we are destroying the device. It should >>> gone. All references to it should also gone. So, we should perform the >>> cleaning and remove all IPv6 addresses, so notifier should also work. >> >> We need to take care of n

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Eric W. Biederman
"Denis V. Lunev" <[EMAIL PROTECTED]> writes: >> Index: linux-2.6-netns/net/ipv6/addrconf.c >> === >> --- linux-2.6-netns.orig/net/ipv6/addrconf.c >> +++ linux-2.6-netns/net/ipv6/addrconf.c >> @@ -2272,7 +2272,8 @@ static int addrconf_

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Eric W. Biederman
Daniel Lezcano <[EMAIL PROTECTED]> writes: > The loopback is now dynamically allocated. The ipv6 code was written > considering the loopback is allocated before the ipv6 protocol > initialization. This is still the case when we don't use multiple > network namespaces. You do know that register_

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Denis V. Lunev
>> why should we care on down? we are destroying the device. It should >> gone. All references to it should also gone. So, we should perform the >> cleaning and remove all IPv6 addresses, so notifier should also work. > > We need to take care of netdev down, someone can put the loopback down > if

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Daniel Lezcano
Denis V. Lunev wrote: Daniel Lezcano wrote: The loopback is now dynamically allocated. The ipv6 code was written considering the loopback is allocated before the ipv6 protocol initialization. This is still the case when we don't use multiple network namespaces. In the case of the network name

Re: [patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Denis V. Lunev
Daniel Lezcano wrote: > The loopback is now dynamically allocated. The ipv6 code was written > considering the loopback is allocated before the ipv6 protocol > initialization. This is still the case when we don't use multiple > network namespaces. > > In the case of the network namespaces, ipv6 n

[patch 1/1][NETNS][IPV6] protect addrconf from loopback registration

2007-11-12 Thread Daniel Lezcano
The loopback is now dynamically allocated. The ipv6 code was written considering the loopback is allocated before the ipv6 protocol initialization. This is still the case when we don't use multiple network namespaces. In the case of the network namespaces, ipv6 notification handler is already set