]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7fd34bac7dc40891618b99bac9accaed7387f994
tree4a7ac0e5fdf5a68951df8187bb60955e914508fc
parent35f9566aa3a157294b8aebad17eac3f205a7f677
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