summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:55:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:55:46 +0000
commit4f40546c96c6aeaa4371161dca9db21071bcc5d2 (patch)
tree41199f3c71bb1b62bdee8e83577351f6ee70d031 /bgpd/bgp_zebra.c
parentAdding upstream version 10.0. (diff)
downloadfrr-4f40546c96c6aeaa4371161dca9db21071bcc5d2.tar.xz
frr-4f40546c96c6aeaa4371161dca9db21071bcc5d2.zip
Adding upstream version 10.0.1.upstream/10.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 87f2e55..fe29662 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -3187,12 +3187,12 @@ static int bgp_zebra_process_srv6_locator_add(ZAPI_CALLBACK_ARGS)
struct bgp *bgp = bgp_get_default();
const char *loc_name = bgp->srv6_locator_name;
- if (zapi_srv6_locator_decode(zclient->ibuf, &loc) < 0)
- return -1;
-
if (!bgp || !bgp->srv6_enabled)
return 0;
+ if (zapi_srv6_locator_decode(zclient->ibuf, &loc) < 0)
+ return -1;
+
if (bgp_zebra_srv6_manager_get_locator_chunk(loc_name) < 0)
return -1;
@@ -3210,6 +3210,9 @@ static int bgp_zebra_process_srv6_locator_delete(ZAPI_CALLBACK_ARGS)
struct in6_addr *tovpn_sid;
struct prefix_ipv6 tmp_prefi;
+ if (!bgp)
+ return 0;
+
if (zapi_srv6_locator_decode(zclient->ibuf, &loc) < 0)
return -1;