]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Request SRv6 locator after zebra connection
authorCarmine Scarpitta <cscarpit@cisco.com>
Sat, 8 Feb 2025 23:44:01 +0000 (00:44 +0100)
committerCarmine Scarpitta <cscarpit@cisco.com>
Sat, 8 Feb 2025 23:54:29 +0000 (00:54 +0100)
When SRv6 is enabled and an SRv6 locator is specified in the BGP
configuration, BGP may attempt to request SRv6 locator information from
zebra before the connection is fully established. If this occurs, the
request fails with the following error:

```
2025/02/06 16:37:32 BGP: [HR66R-TWQYD][EC 100663302] srv6_manager_get_locator: invalid zclient socket
````

As a result, BGP is unable to obtain the locator information,
preventing SRv6 VPN from working.

This commit fixes the issue by ensuring BGP requests SRv6 locator
information once the connection with zebra is successfully established.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
bgpd/bgp_zebra.c

index 1669aabc60f27b5b8035481b3e076d37c366a523..84ff88be16f6e63b0856c607784f914d3fa08077 100644 (file)
@@ -2349,6 +2349,13 @@ void bgp_zebra_instance_register(struct bgp *bgp)
                bgp_zebra_advertise_all_vni(bgp, 1);
 
        bgp_nht_register_nexthops(bgp);
+
+       /*
+        * Request SRv6 locator information from Zebra, if SRv6 is enabled
+        * and a locator is configured for this BGP instance.
+        */
+       if (bgp->srv6_enabled && bgp->srv6_locator_name[0] != '\0' && !bgp->srv6_locator)
+               bgp_zebra_srv6_manager_get_locator(bgp->srv6_locator_name);
 }
 
 /* Deregister this instance with Zebra. Invoked upon the instance