aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vrrp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/vrrp')
-rw-r--r--src/plugins/vrrp/node.c4
-rw-r--r--src/plugins/vrrp/vrrp_packet.c7
2 files changed, 5 insertions, 6 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);
diff --git a/src/plugins/vrrp/vrrp_packet.c b/src/plugins/vrrp/vrrp_packet.c
index 6b0d4c96c2d..b77f336930a 100644
--- a/src/plugins/vrrp/vrrp_packet.c
+++ b/src/plugins/vrrp/vrrp_packet.c
@@ -14,6 +14,7 @@
#include <vnet/adj/adj.h>
#include <vnet/adj/adj_mcast.h>
#include <vnet/fib/fib_table.h>
+#include <vnet/fib/fib_sas.h>
#include <vnet/ip/igmp_packet.h>
#include <vnet/ip/ip6_link.h>
#include <vnet/ethernet/arp_packet.h>
@@ -107,8 +108,7 @@ vrrp_adv_l3_build (vrrp_vr_t * vr, vlib_buffer_t * b,
ip4->ttl = 255;
ip4->protocol = IP_PROTOCOL_VRRP;
clib_memcpy (&ip4->dst_address, &dst->ip4, sizeof (dst->ip4));
- ip4_src_address_for_packet (&ip4_main.lookup_main,
- vr->config.sw_if_index, &ip4->src_address);
+ fib_sas4_get (vr->config.sw_if_index, NULL, &ip4->src_address);
ip4->length = clib_host_to_net_u16 (sizeof (*ip4) +
vrrp_adv_payload_len (vr));
ip4->checksum = ip4_header_checksum (ip4);
@@ -541,8 +541,7 @@ vrrp_igmp_pkt_build (vrrp_vr_t * vr, vlib_buffer_t * b)
ip4 = vlib_buffer_get_current (b);
clib_memcpy (ip4, &igmp_ip4_mcast, sizeof (*ip4));
- ip4_src_address_for_packet (&ip4_main.lookup_main, vr->config.sw_if_index,
- &ip4->src_address);
+ fib_sas4_get (vr->config.sw_if_index, NULL, &ip4->src_address);
vlib_buffer_chain_increase_length (b, b, sizeof (*ip4));
vlib_buffer_advance (b, sizeof (*ip4));