X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fvrrp%2Fnode.c;h=7ba18c4f75cbc3a50ee043669ba5ef90269119e4;hb=e2fe09742;hp=a916bcc03ffbde0e9e87251e875be92693fce54f;hpb=39008ca19ea46922541f80fdafd713e198fce8c6;p=vpp.git diff --git a/src/plugins/vrrp/node.c b/src/plugins/vrrp/node.c index a916bcc03ff..7ba18c4f75c 100644 --- a/src/plugins/vrrp/node.c +++ b/src/plugins/vrrp/node.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -120,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); @@ -334,11 +333,18 @@ vrrp_arp_nd_next (vlib_buffer_t * b, u32 * next_index, u32 * vr_index, if (*vr_index == ~0) return; - /* only reply if the VR is in the master state */ vr = vrrp_vr_lookup_index (*vr_index); if (!vr || vr->runtime.state != VRRP_VR_STATE_MASTER) - return; + { + /* RFC 5798 - section 6.4.2 - Backup "MUST NOT respond" to ARP/ND. + * So we must drop the request rather than allowing it to continue + * on the feature arc. + */ + *next_index = VRRP_ARP_INPUT_NEXT_DROP; + return; + } + /* RFC 5798 section 6.4.3: Master "MUST respond" to ARP/ND. */ eth = ethernet_buffer_get_header (b); rewrite = ethernet_build_rewrite (vnm, sw_if_index, link_type, eth->src_address);