netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	"Denis V. Lunev" <den@openvz.org>
Subject: Re: [git pull] VFS patches, the first series
Date: Sat, 23 Aug 2008 08:24:13 +0100	[thread overview]
Message-ID: <20080823072413.GJ28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <m1iqttnc7a.fsf@frodo.ebiederm.org>

On Thu, Aug 21, 2008 at 05:08:25PM -0700, Eric W. Biederman wrote:

> Ok.  The situation is now clear.
> 
> /proc/sys/net/ipv4/neigh/default does not currently exist in network
> namespaces.    This looks like an oversight.
> 
> In my network namespace I have the interfaces lo, sit, veth0
> 
> We have the result that /proc/sys/net/ipv4/neigh/veth0 has /proc/sys/net/ipv4/neigh/lo.
> 
> lo gets unregistered before veth0 when we bring the network namespaces down.
> Then when veth gets unregistered we have a problem.
> 
> I'm not certain what to do about it.

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 16fc6f4..d3c156e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3054,14 +3054,23 @@ static ctl_table ipv4_route_table[] = {
 	{ .ctl_name = 0 }
 };
 
-static __net_initdata struct ctl_path ipv4_route_path[] = {
+static struct ctl_table empty[1];
+
+static struct ctl_table ipv4_skeleton[] =
+{
+	{ .procname = "route", .ctl_name = NET_IPV4_ROUTE,
+	  .child = ipv4_route_table},
+	{ .procname = "neigh", .ctl_name = NET_IPV4_NEIGH,
+	  .child = empty},
+	{ }
+};
+
+static __net_initdata struct ctl_path ipv4_path[] = {
 	{ .procname = "net", .ctl_name = CTL_NET, },
 	{ .procname = "ipv4", .ctl_name = NET_IPV4, },
-	{ .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
 	{ },
 };
 
-
 static struct ctl_table ipv4_route_flush_table[] = {
 	{
 		.ctl_name 	= NET_IPV4_ROUTE_FLUSH,
@@ -3074,6 +3083,13 @@ static struct ctl_table ipv4_route_flush_table[] = {
 	{ .ctl_name = 0 },
 };
 
+static __net_initdata struct ctl_path ipv4_route_path[] = {
+	{ .procname = "net", .ctl_name = CTL_NET, },
+	{ .procname = "ipv4", .ctl_name = NET_IPV4, },
+	{ .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
+	{ },
+};
+
 static __net_init int sysctl_route_net_init(struct net *net)
 {
 	struct ctl_table *tbl;
@@ -3223,7 +3239,7 @@ int __init ip_rt_init(void)
  */
 void __init ip_static_sysctl_init(void)
 {
-	register_sysctl_paths(ipv4_route_path, ipv4_route_table);
+	register_sysctl_paths(ipv4_path, ipv4_skeleton);
 }
 #endif
 

      parent reply	other threads:[~2008-08-23  7:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080727012212.GW28946@ZenIV.linux.org.uk>
     [not found] ` <m1d4k2zui4.fsf@frodo.ebiederm.org>
     [not found]   ` <m1od3mthma.fsf@frodo.ebiederm.org>
2008-08-22  0:08     ` [git pull] VFS patches, the first series Eric W. Biederman
2008-08-23  3:33       ` Al Viro
2008-08-23  5:22         ` Eric W. Biederman
2008-08-23  7:24       ` Al Viro [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=20080823072413.GJ28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=den@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).