diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2020-11-26 08:37:27 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-12-08 09:00:24 +0000 |
commit | e2fe097424fb169dfe01421ff17b8ccd0c26b4a6 (patch) | |
tree | 2d9993f78d9165c1aba23b1daa4067106da81b45 /src/plugins/vrrp/node.c | |
parent | 9b8cb5082471dd670066b8ba2872ffbcc35a87f8 (diff) |
fib: Source Address Selection
Type: feature
Use the FIB to provide SAS (in so far as it is today)
- Use the glean adjacency as the record of the connected prefixes
= there's a glean per-{interface, protocol, connected-prefix}
- Keep the glean up to date with whatever the recieve host prefix is
(since it can change)
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I0f3dd1edb1f3fc965af1c7c586709028eb9cdeac
Diffstat (limited to 'src/plugins/vrrp/node.c')
-rw-r--r-- | src/plugins/vrrp/node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/vrrp/node.c b/src/plugins/vrrp/node.c index 486c1a819c2..7ba18c4f75c 100644 --- a/src/plugins/vrrp/node.c +++ b/src/plugins/vrrp/node.c @@ -12,6 +12,7 @@ #include <vnet/ip/ip4_packet.h> #include <vnet/ip/ip6_link.h> #include <vnet/ethernet/arp_packet.h> +#include <vnet/fib/fib_sas.h> #include <vppinfra/error.h> #include <vrrp/vrrp.h> #include <vrrp/vrrp_packet.h> @@ -119,8 +120,7 @@ vrrp_vr_addr_cmp (vrrp_vr_t * vr, vrrp_header_t * pkt) peer_addr = &(((ip4_header_t *) pkt) - 1)->src_address; local_addr = &addr.ip4; addr_size = 4; - ip4_src_address_for_packet (&ip4_main.lookup_main, - vrc->sw_if_index, local_addr); + fib_sas4_get (vrc->sw_if_index, NULL, local_addr); } return memcmp (local_addr, peer_addr, addr_size); |