mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Revert "net-loopback: set lo dev initial state to UP"
In commitc9dca822c7
("net-loopback: set lo dev initial state to UP"), linux started automatically bringing up the loopback device of a newly created namespace. However, an existing user script might reasonably have the following stanza when creating a new namespace -- and in fact at least tools/testing/selftests/net/fib_nexthops.sh in Linux's very own testsuite does: # set -e # ip netns add foo # ip -netns foo addr add 127.0.0.1/8 dev lo # ip -netns foo link set lo up # set +e This will now fail, because the kernel reasonably rejects "ip addr add" of a duplicate address. The described change of behavior therefore constitutes a breakage. Revert it. Fixes:c9dca822c7
("net-loopback: set lo dev initial state to UP") Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4217a64e18
commit
1edb5cbf49
@@ -219,12 +219,6 @@ static __net_init int loopback_net_init(struct net *net)
|
|||||||
|
|
||||||
BUG_ON(dev->ifindex != LOOPBACK_IFINDEX);
|
BUG_ON(dev->ifindex != LOOPBACK_IFINDEX);
|
||||||
net->loopback_dev = dev;
|
net->loopback_dev = dev;
|
||||||
|
|
||||||
/* bring loopback device UP */
|
|
||||||
rtnl_lock();
|
|
||||||
dev_open(dev, NULL);
|
|
||||||
rtnl_unlock();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_free_netdev:
|
out_free_netdev:
|
||||||
|
Reference in New Issue
Block a user