From: Hiroki Shirokura Date: Mon, 25 Oct 2021 23:36:14 +0000 (+0000) Subject: lib: fix srv6 route hardcode with BGP X-Git-Tag: base_8.2~295^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8563b9722ac7293b0cca4bc7d869943fef9a09c4;p=matthieu%2Ffrr.git 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 --- diff --git a/lib/zclient.c b/lib/zclient.c index 90439d5e17..e9a020df13 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));