]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Remove redundant route flushing during namespace dismantle
authorIdo Schimmel <idosch@mellanox.com>
Sun, 7 Jan 2018 10:45:01 +0000 (12:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 02:29:39 +0000 (21:29 -0500)
commit976977d4e5cfd39d435bff1c8a2c8a0ff17a834a
treed165e722efd5aac6b4d7dff9acd6beab335f2a88
parent54648f5ab0b8c959ddfbf117e990ad2fdadb2e7e
ipv6: Remove redundant route flushing during namespace dismantle

By the time fib6_net_exit() is executed all the netdevs in the namespace
have been either unregistered or pushed back to the default namespace.
That is because pernet subsys operations are always ordered before
pernet device operations and therefore invoked after them during
namespace dismantle.

Thus, all the routing tables in the namespace are empty by the time
fib6_net_exit() is invoked and the call to rt6_ifdown() can be removed.

This allows us to simplify the condition in fib6_ifdown() as it's only
ever called with an actual netdev.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_fib.c
net/ipv6/route.c