]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Move IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN to helper
authorDavid Ahern <dsahern@gmail.com>
Thu, 28 Mar 2019 03:53:47 +0000 (20:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2019 17:48:03 +0000 (10:48 -0700)
commitbb94c10e8b9f296e42e43f2c282c5cf582dd4530
treedf3c9ac99ca90245fa32e9f5cd115f665eb2f117
parenteeda2721c9d74c19c7de6781bea946eb1b9c8df3
ipv4: Move IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN to helper

in_dev lookup followed by IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN check
is called in several places, some with the rcu lock and others with the
rtnl held.

Move the check to a helper similar to what IPv6 has. Since the helper
can be invoked from either context use rcu_dereference_rtnl to
dereference ip_ptr.

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/inetdevice.h
net/ipv4/fib_semantics.c
net/ipv4/fib_trie.c