netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi-fAAogVwAN2Kw5LPnMra/2Q@public.gmane.org>
To: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: Ben Greear <greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>,
	Linux Netdev List
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Netfilter Development Mailinglist
	<netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones"
Date: Tue, 23 Feb 2010 08:27:03 -0500	[thread overview]
Message-ID: <1266931623.3973.643.camel@bigi> (raw)
In-Reply-To: <m1wry46es9.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>

On Mon, 2010-02-22 at 15:17 -0800, Eric W. Biederman wrote:

> What I am thinking is:
> 
> "ip ns <name> route add blah" is:
> fd = open("/var/run/netns/<name>");
> sys_setns(fd);  /* Like unshare but takes an existing namespace */
> /* Then the rest of the existing ip command */

The other two below make some sense; For the above:
Does the point after sys_setns(fd) allow me to do io inside
ns <name>? Can i do open() and get a fd from ns <name>?

> "ip ns list" is:
> dfd = open("/var/run/netns", O_DIRECTORY);
> getdents(dfd, buf, count);
> 
> "ip ns new <name>" is:
> unshare(CLONE_NEWNS);
> fd = nsfd(NETNS);
> mkdir("/var/run/netns/<name>");
> mount("none", "/var/run/netns/<name>", "ns", 0, fd);
> 
> Using unix domain names means that which namespaces you see is under
> control of userspace.  Which allows for nested containers (something I
> use today), and ultimately container migration.

The only problem that i see is events are not as nice. I take it i am 
going to get something like an inotify when a new namespace is created?

> Using genetlink userspace doesn't result in a nestable implementation
> unless I introduce yet another namespace, ugh.

Is it not just a naming convention that you are dealing with?
Example in your scheme above a nested namespace shows up as:
/var/run/netns/<name>/<nestedname>, no?

cheers,
jamal

  parent reply	other threads:[~2010-02-23 13:27 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-14 14:05 RFC: netfilter: nf_conntrack: add support for "conntrack zones" Patrick McHardy
2010-01-14 15:05 ` jamal
2010-01-14 15:37   ` Patrick McHardy
2010-01-14 17:33     ` jamal
2010-01-15 10:15       ` Patrick McHardy
2010-01-15 15:19         ` jamal
2010-02-22 20:46           ` Eric W. Biederman
2010-02-22 21:55             ` jamal
2010-02-22 23:17               ` Eric W. Biederman
     [not found]                 ` <m1wry46es9.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-02-23 13:27                   ` jamal [this message]
2010-02-23 14:07                     ` Eric W. Biederman
2010-02-23 14:20                       ` jamal
2010-02-23 20:00                         ` Eric W. Biederman
2010-02-23 23:09                           ` jamal
2010-02-24  1:43                             ` Eric W. Biederman
2010-02-25 20:57                             ` [RFC][PATCH] ns: Syscalls for better namespace sharing control Eric W. Biederman
2010-02-25 21:31                               ` Daniel Lezcano
2010-02-25 21:49                                 ` Eric W. Biederman
2010-02-25 22:13                                   ` Daniel Lezcano
2010-02-25 22:31                                     ` Eric W. Biederman
2010-02-26 20:35                                   ` Eric W. Biederman
2010-02-25 21:46                               ` Matt Helsley
2010-02-25 21:54                                 ` Eric W. Biederman
2010-02-26  0:53                                 ` Eric W. Biederman
2010-02-26  1:09                               ` Matt Helsley
2010-02-26  1:26                                 ` Eric W. Biederman
2010-02-26  3:15                               ` [RFC][PATCH] ns: Syscalls for better namespace sharing control. v2 Eric W. Biederman
     [not found]                                 ` <m18wagy9f3.fsf_-_-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-03-03 20:29                                   ` Jonathan Corbet
2010-03-03 20:50                                     ` Eric W. Biederman
     [not found]                               ` <m1pr3t2fvl.fsf_-_-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-02-26 21:13                                 ` [RFC][PATCH] ns: Syscalls for better namespace sharing control Pavel Emelyanov
2010-02-26 21:24                                   ` Eric W. Biederman
2010-02-26 21:34                                     ` Pavel Emelyanov
2010-02-26 21:42                                       ` Eric W. Biederman
2010-02-26 21:58                                         ` Oren Laadan
2010-02-26 22:16                                           ` Eric W. Biederman
2010-02-26 22:52                                             ` Oren Laadan
2010-02-26 23:13                                               ` Eric W. Biederman
2010-02-27  8:30                                         ` Pavel Emelyanov
2010-02-27  9:04                                           ` Eric W. Biederman
     [not found]                                             ` <m1mxyvrqvk.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-02-27  9:21                                               ` Pavel Emelyanov
2010-02-27  9:42                                                 ` Eric W. Biederman
2010-02-27 16:16                                                   ` Pavel Emelyanov
2010-02-27 19:08                                                     ` Eric W. Biederman
2010-02-27 19:29                                                       ` Pavel Emelyanov
2010-02-27 19:44                                                         ` Eric W. Biederman
2010-02-28 22:05                                                           ` Daniel Lezcano
2010-03-01 19:24                                                             ` Eric W. Biederman
2010-03-01 21:42                                                             ` Eric W. Biederman
2010-03-02 13:10                                                               ` Cedric Le Goater
2010-03-02 15:03                                                             ` Pavel Emelyanov
2010-03-02 15:14                                                               ` Jan Engelhardt
2010-03-02 21:45                                                                 ` Eric W. Biederman
2010-03-02 21:19                                                               ` Sukadev Bhattiprolu
2010-03-02 22:13                                                                 ` Eric W. Biederman
2010-03-03  0:07                                                                   ` Sukadev Bhattiprolu
2010-03-03  0:46                                                                     ` Eric W. Biederman
2010-03-03 15:38                                                                       ` Serge E. Hallyn
2010-03-03 19:47                                                                         ` Eric W. Biederman
2010-03-04 21:45                                                                           ` Eric W. Biederman
2010-03-04 22:55                                                                             ` Jan Engelhardt
2010-03-03 16:50                                                                       ` Pavel Emelyanov
2010-03-03 20:16                                                                         ` Eric W. Biederman
2010-03-05 19:18                                                                           ` Pavel Emelyanov
2010-03-05 20:26                                                                             ` Eric W. Biederman
2010-03-06 14:47                                                                               ` Daniel Lezcano
     [not found]                                                                                 ` <4B926B1B.5070207-GANU6spQydw@public.gmane.org>
2010-03-06 20:48                                                                                   ` Eric W. Biederman
     [not found]                                                                                     ` <m1aaulyy5c.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-03-06 21:26                                                                                       ` Daniel Lezcano
2010-03-08  8:32                                                                                         ` Eric W. Biederman
2010-03-08 16:54                                                                                           ` Daniel Lezcano
2010-03-08 17:29                                                                                             ` Eric W. Biederman
2010-03-08 19:57                                                                                               ` Daniel Lezcano
2010-03-08 20:24                                                                                                 ` Eric W. Biederman
2010-03-08 20:42                                                                                                   ` Daniel Lezcano
2010-03-08 20:47                                                                                                     ` Eric W. Biederman
2010-03-08 21:12                                                                                                       ` Daniel Lezcano
2010-03-08 21:25                                                                                                         ` Eric W. Biederman
2010-03-08 21:49                                                                                                           ` Serge E. Hallyn
2010-03-08 22:24                                                                                                             ` Eric W. Biederman
2010-03-09 10:03                                                                                                           ` Daniel Lezcano
2010-03-09 10:13                                                                                                             ` Eric W. Biederman
2010-03-09 10:26                                                                                                               ` Daniel Lezcano
2010-03-10 21:16                                                                                                           ` Daniel Lezcano
2010-03-08 17:07                                                                                           ` Serge E. Hallyn
2010-03-08 17:35                                                                                             ` Eric W. Biederman
2010-03-08 17:47                                                                                               ` Serge E. Hallyn
2010-03-03 20:59                                                             ` Oren Laadan
2010-03-03 21:05                                                               ` Eric W. Biederman
     [not found]                                                                 ` <m18wa9glpo.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-05-27 12:06                                                                   ` [Devel] " Enrico Weigelt
     [not found]                                     ` <m1bpfbwuze.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-02-26 21:35                                       ` Pavel Emelyanov
2010-02-26 21:49                                         ` Eric W. Biederman
2010-02-23 23:49                           ` RFC: netfilter: nf_conntrack: add support for "conntrack zones" Matt Helsley
2010-02-24  1:32                             ` Eric W. Biederman
2010-02-24  1:39                               ` Serge E. Hallyn
2010-01-14 18:32   ` Ben Greear
2010-01-15 15:03     ` jamal

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=1266931623.3973.643.camel@bigi \
    --to=hadi-faaogvwan2kw5lpnmra/2q@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).