aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/srv6/sr_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/srv6/sr_api.c')
-rw-r--r--src/vnet/srv6/sr_api.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c
index 32eff2ef5e5..f3738da668d 100644
--- a/src/vnet/srv6/sr_api.c
+++ b/src/vnet/srv6/sr_api.c
@@ -50,6 +50,7 @@ _(SR_POLICY_MOD, sr_policy_mod) \
_(SR_POLICY_DEL, sr_policy_del) \
_(SR_STEERING_ADD_DEL, sr_steering_add_del) \
_(SR_SET_ENCAP_SOURCE, sr_set_encap_source) \
+_(SR_SET_ENCAP_HOP_LIMIT, sr_set_encap_hop_limit) \
_(SR_LOCALSIDS_DUMP, sr_localsids_dump) \
_(SR_POLICIES_DUMP, sr_policies_dump) \
_(SR_STEERING_POL_DUMP, sr_steering_pol_dump)
@@ -178,6 +179,20 @@ vl_api_sr_set_encap_source_t_handler (vl_api_sr_set_encap_source_t * mp)
REPLY_MACRO (VL_API_SR_SET_ENCAP_SOURCE_REPLY);
}
+static void
+vl_api_sr_set_encap_hop_limit_t_handler (vl_api_sr_set_encap_hop_limit_t * mp)
+{
+ vl_api_sr_set_encap_hop_limit_reply_t *rmp;
+ int rv = 0;
+
+ if (mp->hop_limit == 0)
+ rv = VNET_API_ERROR_INVALID_VALUE;
+ else
+ sr_set_hop_limit (mp->hop_limit);
+
+ REPLY_MACRO (VL_API_SR_SET_ENCAP_HOP_LIMIT_REPLY);
+}
+
static void vl_api_sr_steering_add_del_t_handler
(vl_api_sr_steering_add_del_t * mp)
{