Commit eb487c7d54 for frr
commit eb487c7d54402b1edfb7a266b1c513f986c8bc8b
Author: Philippe Guibert <philippe.guibert@6wind.com>
Date: Wed Oct 21 18:03:06 2026 +0200
bgpd: remove the extern declaration of bgp_zclient in bgp_srv6.c
The style checker reports the declaration of bgp_zclient in bgp_srv6.c:
> WARNING: externs should be avoided in .c files
bgp_zclient is already declared in bgp_zebra.h, which bgp_srv6.c gets
through bgp_mplsvpn.h.
Fix this by including bgp_zebra.h in bgp_srv6.c, and by removing the
extern declaration.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
diff --git a/bgpd/bgp_srv6.c b/bgpd/bgp_srv6.c
index b4fa41dee9..e723fbbd97 100644
--- a/bgpd/bgp_srv6.c
+++ b/bgpd/bgp_srv6.c
@@ -13,10 +13,9 @@
#include "bgpd/bgp_debug.h"
#include "bgpd/bgp_mplsvpn.h"
#include "bgpd/bgp_srv6.h"
+#include "bgpd/bgp_zebra.h"
#include "bgpd/bgpd.h"
-extern struct zclient *bgp_zclient;
-
static bool bgp_srv6_unicast_dt46_needs_sid_request(struct bgp *bgp, afi_t afi)
{
afi_t other_afi = (afi == AFI_IP) ? AFI_IP6 : AFI_IP;