From 32d98c0491c46f42e836f57bfc0adb4e348f961c Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Wed, 1 Dec 2021 13:53:35 -0800 Subject: [PATCH] zebra: create udp socket for mh arp-nd redirection only if failover is enabled This socket was getting created unconditionally on the first vxlan device config. Later when arp-nd redirection was enabled (happens on first es add) a dup sock-bind would be attempted. This dup-bind would fail with EINVAL causing zebra to mark the socket as "not-ready" for use. Ticket: #2840919 Signed-off-by: Anuradha Karuppiah --- zebra/zebra_evpn_arp_nd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zebra/zebra_evpn_arp_nd.c b/zebra/zebra_evpn_arp_nd.c index 5ee231828b61..db02fbf6bbfd 100644 --- a/zebra/zebra_evpn_arp_nd.c +++ b/zebra/zebra_evpn_arp_nd.c @@ -577,6 +577,9 @@ void zebra_evpn_arp_nd_if_update(struct zebra_if *zif, bool enable) */ void zebra_evpn_arp_nd_udp_sock_create(void) { + if (!(zevpn_arp_nd_info.flags & ZEBRA_EVPN_ARP_ND_FAILOVER)) + return; + if (zmh_info->es_originator_ip.s_addr) { struct sockaddr_in sin; int reuse = 1;