Linux Container Development
 help / color / mirror / Atom feed
From: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Mathieu Peresse
	<mathieu.peresse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: VRF-like use of Network Namespaces
Date: Fri, 11 Jun 2010 07:59:17 -0700	[thread overview]
Message-ID: <878w6lobsq.fsf@caffeine.danplanet.com> (raw)
In-Reply-To: <AANLkTilUNrMAeeUjHsXkTwd7Ysx0o9mdl8UaSUvG6wvf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (Mathieu Peresse's message of "Fri\, 11 Jun 2010 16\:47\:00 +0200")

MP> I saw there was a rtnetlink attribute to set the netns of a device but it
MP> uses the PID of a namespace owner to do so... within 'ip' i can refer to
MP> only one namespace (i.e. the one that 'ip' task_struct->ns_proxy currently
MP> points to), so I won't be able to move an interface from outside my
MP> namespace to my namespace...

Not just the owner, but any process in the namespace, AFAIK.  So, you
should be able to fork() a child, have that child setns() into the
namespace of your choosing, and then move the device to the process of
your child (since you now know the pid).  It's a little indirect, but
it should work.

-- 
Dan Smith
IBM Linux Technology Center
email: danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org

  parent reply	other threads:[~2010-06-11 14:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 15:23 VRF-like use of Network Namespaces Mathieu Peresse
     [not found] ` <AANLkTimA_0aZwZM1uZ-GH3OxfEZvegoitaaKTYPLvW5F-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-08 15:40   ` Daniel Lezcano
     [not found]     ` <4C0E6466.3030100-GANU6spQydw@public.gmane.org>
2010-06-08 17:12       ` Mathieu Peresse
     [not found]         ` <AANLkTik77W7F7BV7qp9ZQlM3yJCKNydHAMN47FaLTr7Z-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-08 21:06           ` Daniel Lezcano
     [not found]             ` <4C0EB0C5.8070904-GANU6spQydw@public.gmane.org>
2010-06-08 21:48               ` Mathieu Peresse
     [not found]                 ` <AANLkTinmsRRKdWaf8QONeRRJSQRXPhaUtY1cFv_JGcy8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-11 14:47                   ` Mathieu Peresse
     [not found]                     ` <AANLkTilUNrMAeeUjHsXkTwd7Ysx0o9mdl8UaSUvG6wvf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-11 14:59                       ` Dan Smith [this message]
2010-06-11 15:52                       ` Daniel Lezcano
     [not found]                         ` <4C125BA4.4020300-GANU6spQydw@public.gmane.org>
2010-06-13  9:59                           ` Eric W. Biederman
     [not found]                             ` <m11vcbl0d5.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-06-13 13:35                               ` Mathieu Peresse
2010-06-13 20:30                               ` Daniel Lezcano
2010-06-13  9:43                       ` Eric W. Biederman

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=878w6lobsq.fsf@caffeine.danplanet.com \
    --to=danms-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=mathieu.peresse-Re5JQEeQqe8AvxtiuMwx3w@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