public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@free•fr>
To: Shan Wei <shanwei@cn•fujitsu.com>
Cc: Lucian Adrian Grijincu <lucian.grijincu@gmail•com>,
	netdev@vger•kernel.org, "David S . Miller" <davem@davemloft•net>,
	Benjamin Thery <benjamin.thery@bull•net>
Subject: Re: [PATCH] sysctl: ipv6: use correct net in ipv6_sysctl_rtcache_flush
Date: Wed, 02 Mar 2011 17:38:23 +0100	[thread overview]
Message-ID: <4D6E727F.6090600@free.fr> (raw)
In-Reply-To: <4D6DB89E.6010709@cn.fujitsu.com>

On 03/02/2011 04:25 AM, Shan Wei wrote:
> Lucian Adrian Grijincu wrote, at 02/25/2011 01:48 PM:
>> Before this patch issuing these commands:
>>
>>    fd = open("/proc/sys/net/ipv6/route/flush")
>>    unshare(CLONE_NEWNET)
>>    write(fd, "stuff")
>>
>> would flush the newly created net, not the original one.
>
> After appling your patch, when excuting above commands,
> router cache still not be flushed in init net namespace.
> But IPv4 is ok.
>
> Host1:                   Host2
> ping6 Host2
>                          (shell1)
> 			open(/proc/sys/net/ipv6/route/flush)
> 			unshare(CLONE_NEWNET)
> 			while(1) {write(fd, "stuff")}
>
>
> 			(shell2)
>                          ip -6 route show cache<==1*
> 			1*: IPv6 will show one route cache entry.
> 			    But IPv4 shows nothing.
>
> As changlog said, after this patch, shell1 only fulsh the original
> net namespace, not the newly created one. But from shell2, we
> can see that IPv6 route cache is not flushed.
>
> Have i missed something?

Yes, you are right you shouldn't see any route from shell2.
Are you sure 'ip -6 route show cache' does not show the route cache in a 
window where ping6 created a new route and 'write(fd, "stuff")' did not 
flushed the new route yet ?

      reply	other threads:[~2011-03-02 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25  5:48 [PATCH] sysctl: ipv6: use correct net in ipv6_sysctl_rtcache_flush Lucian Adrian Grijincu
2011-02-25 15:30 ` Daniel Lezcano
2011-02-25 19:02   ` David Miller
2011-03-02  3:25 ` Shan Wei
2011-03-02 16:38   ` Daniel Lezcano [this message]

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=4D6E727F.6090600@free.fr \
    --to=daniel.lezcano@free$(echo .)fr \
    --cc=benjamin.thery@bull$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=lucian.grijincu@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shanwei@cn$(echo .)fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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