[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090424.221923.232357312.davem@davemloft.net>
Date: Fri, 24 Apr 2009 22:19:23 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: emil@...ux.org.pl
Cc: netdev@...r.kernel.org, ebiederm@...well.aristanetworks.com,
daniel.lezcano@...e.fr
Subject: Re: Loopback and net namespace
From: emil@...ux.org.pl
Date: Fri, 24 Apr 2009 23:55:36 +0200 (CEST)
>
> Currently it is impossible to use both net namespace and sysfs
> because sysfs does not allow two devices with the same name
> and each net namespace has to have loopback device.
>
> To have this working there must be possibility to
> create loopback devices with different names.
>
> The easiest way to acomplish this seems to be with this patch below.
>
> I know the devices will be seen in each namespace, but sometimes
> the only thing that is needed is network environment separation.
> For example when I need to run two different services on the same TCP
> port
> bound to 0.0.0.0.
>
> This patch will not break anything and allow people to test
> net namespace functionality.
Can you please contact the namespace developers when you post things
like this (as I have on the CC: list now)? I was sure this issue had
been resolved already or there was a larger plan to do so.
Also your patch is very poorly formatted, lacks a proper signoff, was
corrupted by your email client, etc. so we wouldn't be able consider
it anyways.
> ----------------------- CUT HERE ------------------------------
>
> --- /usr/src/linux/drivers/net/loopback.c 2008-04-17 04:49:44.000000000
> --- +0200
> +++ /usr/src/linux/drivers/net/loopback.c.new 2009-04-24
> 23:27:43.000000000 +0200
> @@ -254,7 +254,11 @@
> int err;
>
> err = -ENOMEM;
> +#ifdef CONFIG_SYSFS
> + dev = alloc_netdev(0, (net == &init_net) ? "lo" : "lo%d",
> loopback_setup);
> +#else
> dev = alloc_netdev(0, "lo", loopback_setup);
> +#endif
> if (!dev)
> goto out;
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists