ipv4: Refactor fib_check_nh
authorDavid Ahern <dsahern@gmail.com>
Fri, 5 Apr 2019 23:30:31 +0000 (16:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 22:22:41 +0000 (15:22 -0700)
commit448d7248191706cbbd7761e3bc72c2985c4d38a7
tree30cf5625d5b433cce8f8b1bca1369249a2c9954b
parenta4ea5d43c807be28545625c1e0641905022fa0d1
ipv4: Refactor fib_check_nh

fib_check_nh is currently huge covering multiple uses cases - device only,
device + gateway, and device + gateway with ONLINK. The next patch adds
validation checks for IPv6 which only further complicates it. So, break
fib_check_nh into 2 helpers - one for gateway validation and one for device
only.

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