vrrp: fix support for VRs in different FIBs 15/34815/1
authorMatthew Smith <mgsmith@netgate.com>
Tue, 21 Dec 2021 15:00:05 +0000 (09:00 -0600)
committerMatthew Smith <mgsmith@netgate.com>
Mon, 3 Jan 2022 21:45:43 +0000 (15:45 -0600)
commitfa74a64def2132fb0c81e981547ac65888751aa9
tree6fafb6f327c086fba7bc0f5edd41afcbcfd39c2e
parenta3d8c2c21472c3088fb770d60d111fd5c55d9225
vrrp: fix support for VRs in different FIBs

Type: fix
Fixes: 4b1b13315a3c

When adding or deleting a VR, multicast routes can be added or deleted.
When the first VR is added, a local (dpo-receive) route is added. The
route is deleted when the last VR is deleted.

Perform the check on whether to add or delete the route on a per-FIB
basis. Otherwise, if the route is only added after the first VR is added
without regards to the FIB being used and a second VR is added later on
an interface attached to a different FIB, the necessary route will not be
added to the FIB used by the second interface.

Change-Id: Ib30925ecf45c714cfe3ac6a223754bea918f10e3
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/plugins/vrrp/vrrp.c