]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix srv6 route hardcode with BGP 9901/head
authorHiroki Shirokura <hiroki.shirokura@linecorp.com>
Mon, 25 Oct 2021 23:36:14 +0000 (23:36 +0000)
committermergify-bot <noreply@mergify.io>
Tue, 26 Oct 2021 14:44:35 +0000 (14:44 +0000)
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 <hiroki.shirokura@linecorp.com>
(cherry picked from commit 8563b9722ac7293b0cca4bc7d869943fef9a09c4)

lib/zclient.c

index dde60a6c903210cc0f44a75a69b02d7729cb57fb..39b881cdc4eaaf6894f1818af2b57d913509e878 100644 (file)
@@ -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));