OSDN Git Service

ipv4: Notify route if replacing currently offloaded one
authorIdo Schimmel <idosch@mellanox.com>
Sat, 14 Dec 2019 15:53:09 +0000 (17:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2019 00:14:42 +0000 (16:14 -0800)
commitee3936d658821d26de9039c64c90750ba240989d
tree4a7ac0e5fdf5a68951df8187bb60955e914508fc
parentb5fc0430dcbb36294b29a25cddb3bf7e92fe2307
ipv4: Notify route if replacing currently offloaded one

When replacing a route, its replacement should only be notified in case
the replaced route is of any interest to listeners. In other words, if
the replaced route is currently used in the data path, which means it is
the first route in the FIB alias list with the given {prefix, prefix
length, table ID}.

v2:
* Convert to use fib_find_alias() instead of fib_find_first_alias()

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