]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net/ipv4: Move call_fib_entry_notifiers up for new routes
authorDavid Ahern <dsa@cumulusnetworks.com>
Wed, 28 Mar 2018 01:21:57 +0000 (18:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Mar 2018 18:10:30 +0000 (14:10 -0400)
commit6635f311eab40b6d97eb884f371be41d0f5a3ed6
treeabfa6b3efeacc7c14c1f19e0ac1db52c6ae832a7
parent9776d32537d2bbc251fd1de651e2bb2439474bde
net/ipv4: Move call_fib_entry_notifiers up for new routes

Move call to call_fib_entry_notifiers for new IPv4 routes to right
before the call to fib_insert_alias. At this point the only remaining
failure path is memory allocations in fib_insert_node. Handle that
very unlikely failure with a call to call_fib_entry_notifiers to
tell drivers about it.

At this point notifier handlers can decide the fate of the new route
with a clean path to delete the potential new entry if the notifier
returns non-0.

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