]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fib: Send notification before deleting FIB alias
authorIdo Schimmel <idosch@mellanox.com>
Thu, 9 Feb 2017 09:28:40 +0000 (10:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2017 16:32:12 +0000 (11:32 -0500)
commit9b63cb5e4ef2dba335eb9dc7217bae897460fe5a
treeaa71cb5a7eb9c65ba03cf47e494f8b15cae0d622
parenta0bb38aaabf1330b5acc95d7c73cf2e759726b97
ipv4: fib: Send notification before deleting FIB alias

When a FIB alias is replaced following NLM_F_REPLACE, the ENTRY_ADD
notification is sent after the reference on the previous FIB info was
dropped. This is problematic as potential listeners might need to access
it in their notification blocks.

Solve this by sending the notification prior to the deletion of the
replaced FIB alias. This is consistent with ENTRY_DEL notifications.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c