diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 18:03:40 -0700 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 18:03:40 -0700 | 
| commit | 8e370bfa141067363204c13bb747c7b8410368e8 (patch) | |
| tree | 27d7e3430763b2e3b167dd7d544af7510050144d /ospf6d/ospf6_interface.h | |
| parent | ca1f4309e6dfbbed7823ff76160c0b2401a58115 (diff) | |
ospf6d: ospfv3-setsocket-retry.patch
SYMPTOM:
With quagga running on Linux, 'ifdown <if-name>' followed by 'ifup <ifname>
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 <vipin@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
             Satish Ashok <sashok@cumulusnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_interface.h')
| -rw-r--r-- | ospf6d/ospf6_interface.h | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index 95a377fbb0..df892cf16f 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -78,6 +78,9 @@ struct ospf6_interface    /* Interface State */    u_char state; +  /* Interface socket setting trial counter, resets on success */ +  u_char sso_try_cnt; +    /* OSPF6 Interface flag */    char flag; @@ -140,7 +143,8 @@ extern const char *ospf6_interface_state_str[];  #define OSPF6_INTERFACE_INSTANCE_ID    0  #define OSPF6_INTERFACE_BANDWIDTH      10000   /* Kbps */  #define OSPF6_REFERENCE_BANDWIDTH      100000  /* Kbps */ - +#define OSPF6_INTERFACE_SSO_RETRY_INT  1 +#define OSPF6_INTERFACE_SSO_RETRY_MAX  5  /* Function Prototypes */  | 
