ipv4: Fix table id reference in fib_sync_down_addr
authorDavid Ahern <dsahern@kernel.org>
Thu, 7 Nov 2019 18:29:52 +0000 (18:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:15:37 +0000 (19:15 +0100)
commited9acfe27588dd883a29d2564c87fecd1fd1cb24
treec099de81600b127f6887295d033062af75f50336
parenta3622b6d5f83a6088298515fd1fdfc9b75450f4e
ipv4: Fix table id reference in fib_sync_down_addr

[ Upstream commit e0a312629fefa943534fc46f7bfbe6de3fdaf463 ]

Hendrik reported routes in the main table using source address are not
removed when the address is removed. The problem is that fib_sync_down_addr
does not account for devices in the default VRF which are associated
with the main table. Fix by updating the table id reference.

Fixes: 5a56a0b3a45d ("net: Don't delete routes in different VRFs")
Reported-by: Hendrik Donner <hd@os-cillation.de>
Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/fib_semantics.c