From 8e370bfa141067363204c13bb747c7b8410368e8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:03:40 -0700 Subject: ospf6d: ospfv3-setsocket-retry.patch SYMPTOM: With quagga running on Linux, 'ifdown ' followed by 'ifup can cause OSPFv3 to not receive Hello packets on the interface. ISSUE: Operating System's interface IPv6 readiness may not be guaranteed at the time of interface-up event. Thats because the ipv6 components in an OS may also be listening to the same interface-up event that (in this case) is relayed to OSPFv3. In this failure case, setsockopt with option IPV6_JOIN_GROUP on the interface returned EINVAL. Error logs - OSPF6: Zebra Interface state change: swp1 index 3 flags 11043 metric 1 mtu 1500 OSPF6: Interface Event swp1: [InterfaceUp] OSPF6: Network: setsockopt (20) on ifindex 3 failed: Invalid argument FIX: To take care of this possible race condition, any address-family related setting should be retried. Given it's a rare condition and window of this race should be short, the patch adds a limited retry mechanism for the IPV6 membership setting on the socket. Signed-off-by: Vipin Kumar Reviewed-by: Dinesh Dutt Satish Ashok --- ospf6d/ospf6_network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ospf6d/ospf6_network.h') diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h index 947834d56..7208845d2 100644 --- a/ospf6d/ospf6_network.h +++ b/ospf6d/ospf6_network.h @@ -35,7 +35,7 @@ extern void ospf6_set_pktinfo (void); extern void ospf6_set_checksum (void); extern int ospf6_serv_sock (void); -extern void ospf6_sso (u_int ifindex, struct in6_addr *group, int option); +extern int ospf6_sso (u_int ifindex, struct in6_addr *group, int option); extern int ospf6_sendmsg (struct in6_addr *, struct in6_addr *, unsigned int *, struct iovec *); -- cgit v1.2.3