From a860b3e9e3a59d1b329f40700b44e64779d0d9ae Mon Sep 17 00:00:00 2001 From: Hiroki Shirokura Date: Mon, 25 Oct 2021 23:36:14 +0000 Subject: [PATCH] lib: fix srv6 route hardcode with BGP zclient_send_localsid is called by various routing protocol daemons. To set the srv6 endpoint function. Fix a hard-coded error in the initial implementation. Before this PR, the srv6 function will be registered to zebra as a BGP route even if isisd executes zclient_send_localsid. Signed-off-by: Hiroki Shirokura (cherry picked from commit 8563b9722ac7293b0cca4bc7d869943fef9a09c4) --- lib/zclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zclient.c b/lib/zclient.c index dde60a6c90..39b881cdc4 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -450,7 +450,7 @@ enum zclient_send_status zclient_send_localsid(struct zclient *zclient, p.prefix = *sid; api.vrf_id = VRF_DEFAULT; - api.type = ZEBRA_ROUTE_BGP; + api.type = zclient->redist_default; api.instance = 0; api.safi = SAFI_UNICAST; memcpy(&api.prefix, &p, sizeof(p)); -- 2.39.5