All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: bring UP 'lo' by default after creating new netns
@ 2017-06-29 23:57 Mahesh Bandewar (महेश बंडेवार)
  2017-06-30  1:08 ` Eric W. Biederman
  0 siblings, 1 reply; 49+ messages in thread
From: Mahesh Bandewar (महेश बंडेवार) @ 2017-06-29 23:57 UTC (permalink / raw)
  To: Eric Dumazet, ebiederm, adobriyan, David Miller, xiyou.wangcong
  Cc: linux-netdev

Creation of new network namespace is almost always followed up by
bringing up the loopback device.

        ip netns add foo
        ip -netns foo link set lo up

I'm not sure if there are any consequences of bringing the device UP
at the creation of network-namespace.

thanks,
--mahesh..

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 2178db8e47cd..ac0e86c9a17f 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -428,6 +428,11 @@ struct net *copy_net_ns(unsigned long flags,
                net_drop_ns(net);
                return ERR_PTR(rv);
        }
+       /* Set the loopback device UP */
+       rtnl_lock();
+       dev_open(net->loopback_dev);
+       rtnl_unlock();
+
        return net;
 }

^ permalink raw reply related	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2017-07-18 13:51 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 23:57 RFC: bring UP 'lo' by default after creating new netns Mahesh Bandewar (महेश बंडेवार)
2017-06-30  1:08 ` Eric W. Biederman
2017-06-30  6:26   ` Mahesh Bandewar (महेश बंडेवार)
2017-06-30 12:38   ` [PATCH 1/8] signal/alpha: Document a conflict with SI_USER for SIGTRAP Eric W. Biederman
2017-06-30 12:38     ` Eric W. Biederman
     [not found]     ` <20170630123906.8865-1-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2017-07-02 14:13       ` Helge Deller
2017-07-02 14:13     ` Helge Deller
2017-07-02 14:13       ` Helge Deller
     [not found]       ` <20170702141320.GA32254-PwtjyNU/e7vkVFMGpb/cPg@public.gmane.org>
2017-07-14 10:59         ` Eric W. Biederman
2017-07-14 10:59       ` Eric W. Biederman
2017-07-14 10:59         ` Eric W. Biederman
2017-07-17  8:14         ` Michael Cree
2017-07-17  8:14           ` Michael Cree
2017-07-18 13:37           ` Eric W. Biederman
2017-07-18 13:37             ` Eric W. Biederman
     [not found]         ` <87fudz5lol.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2017-07-17  8:14           ` Michael Cree
2017-06-30 12:39   ` [PATCH 2/8] signal/ia64: Document a conflict with SI_USER with SIGFPE Eric W. Biederman
2017-06-30 12:39     ` Eric W. Biederman
2017-06-30 12:39   ` [PATCH 3/8] signal/sparc: " Eric W. Biederman
2017-06-30 12:39     ` Eric W. Biederman
2017-06-30 16:45     ` David Miller
2017-06-30 16:45       ` David Miller
     [not found]       ` <20170630.124505.736865959393416284.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-06-30 18:13         ` Eric W. Biederman
2017-06-30 18:13           ` Eric W. Biederman
2017-06-30 18:13           ` Eric W. Biederman
2017-07-18 13:43           ` Eric W. Biederman
2017-07-18 13:43             ` Eric W. Biederman
2017-07-18 13:43             ` Eric W. Biederman
     [not found]           ` <8737ahwdgr.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2017-07-18 13:43             ` Eric W. Biederman
     [not found]     ` <20170630123906.8865-3-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2017-06-30 16:45       ` David Miller
2017-06-30 12:39   ` [PATCH 4/8] signal/mips: " Eric W. Biederman
2017-06-30 12:39     ` Eric W. Biederman
2017-06-30 12:39   ` [PATCH 6/8] signal/x86: Fix SIGSYS handling in copy_siginfo_to_user32 Eric W. Biederman
2017-06-30 12:39     ` Eric W. Biederman
     [not found]   ` <87efu22set.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2017-06-30 12:38     ` [PATCH 1/8] signal/alpha: Document a conflict with SI_USER for SIGTRAP Eric W. Biederman
2017-06-30 12:39     ` [PATCH 2/8] signal/ia64: Document a conflict with SI_USER with SIGFPE Eric W. Biederman
2017-06-30 12:39     ` [PATCH 3/8] signal/sparc: " Eric W. Biederman
2017-06-30 12:39     ` [PATCH 4/8] signal/mips: " Eric W. Biederman
2017-06-30 12:39     ` [PATCH 5/8] signal/testing: Don't look for __SI_FAULT in userspace Eric W. Biederman
2017-06-30 12:39       ` Eric W. Biederman
2017-06-30 12:39     ` [PATCH 6/8] signal/x86: Fix SIGSYS handling in copy_siginfo_to_user32 Eric W. Biederman
2017-06-30 12:39     ` [PATCH 7/8] fcntl: Don't use ambiguous SIG_POLL si_codes Eric W. Biederman
2017-06-30 12:39       ` Eric W. Biederman
2017-06-30 12:39     ` [PATCH 8/8] signal: Remove kernel interal si_code magic Eric W. Biederman
2017-06-30 12:39       ` Eric W. Biederman
     [not found]       ` <20170630123906.8865-8-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2017-07-12 22:36         ` Andrei Vagin
2017-07-12 22:36           ` Andrei Vagin
     [not found]           ` <20170712223557.GA21885-1ViLX0X+lBJGNQ1M2rI3KwRV3xvJKrda@public.gmane.org>
2017-07-12 23:08             ` Eric W. Biederman
2017-07-12 23:08           ` Eric W. Biederman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.