diff options
| -rw-r--r-- | lib/zclient.c | 9 | ||||
| -rw-r--r-- | lib/zclient.h | 2 | 
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index d42cb20191..8526cbfaa1 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -427,13 +427,18 @@ enum zclient_send_status zclient_send_vrf_label(struct zclient *zclient,  }  enum zclient_send_status zclient_send_localsid(struct zclient *zclient, -		const struct in6_addr *sid, ifindex_t oif, +		const struct in6_addr *sid, vrf_id_t vrf_id,  		enum seg6local_action_t action,  		const struct seg6local_context *context)  {  	struct prefix_ipv6 p = {};  	struct zapi_route api = {};  	struct zapi_nexthop *znh; +	struct interface *ifp; + +	ifp = if_get_vrf_loopback(vrf_id); +	if (ifp == NULL) +		return ZCLIENT_SEND_FAILURE;  	p.family = AF_INET6;  	p.prefixlen = IPV6_MAX_BITLEN; @@ -456,7 +461,7 @@ enum zclient_send_status zclient_send_localsid(struct zclient *zclient,  	memset(znh, 0, sizeof(*znh));  	znh->type = NEXTHOP_TYPE_IFINDEX; -	znh->ifindex = oif; +	znh->ifindex = ifp->ifindex;  	SET_FLAG(znh->flags, ZAPI_NEXTHOP_FLAG_SEG6LOCAL);  	znh->seg6local_action = action;  	memcpy(&znh->seg6local_ctx, context, sizeof(struct seg6local_context)); diff --git a/lib/zclient.h b/lib/zclient.h index 367e5b1474..e43393fd70 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -901,7 +901,7 @@ zclient_send_vrf_label(struct zclient *zclient, vrf_id_t vrf_id, afi_t afi,  extern enum zclient_send_status  zclient_send_localsid(struct zclient *zclient, const struct in6_addr *sid, -		      ifindex_t oif, enum seg6local_action_t action, +		      vrf_id_t vrf_id, enum seg6local_action_t action,  		      const struct seg6local_context *context);  extern void zclient_send_reg_requests(struct zclient *, vrf_id_t);  | 
