X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fdhcp%2Fdhcp_api.c;h=19457a73358fa6fc4647cb33f9b1a278e9bdaf74;hb=f3be34e44;hp=91ee0aacf7ab7d30b7d10815fe3d9d47ee94af18;hpb=4b89013081851f5e71162244d9e052eac5a98f3d;p=vpp.git diff --git a/src/plugins/dhcp/dhcp_api.c b/src/plugins/dhcp/dhcp_api.c index 91ee0aacf7a..19457a73358 100644 --- a/src/plugins/dhcp/dhcp_api.c +++ b/src/plugins/dhcp/dhcp_api.c @@ -645,6 +645,31 @@ call_dhcp6_reply_event_callbacks (void *data, return error; } +static void +vl_api_dhcp_client_detect_enable_disable_t_handler ( + vl_api_dhcp_client_detect_enable_disable_t *mp) +{ + vl_api_dhcp_client_detect_enable_disable_reply_t *rmp; + int rv = 0; + VALIDATE_SW_IF_INDEX (mp); + + if (mp->enable) + { + vnet_feature_enable_disable ("ip4-unicast", "ip4-dhcp-client-detect", + clib_net_to_host_u32 (mp->sw_if_index), + 1 /* enable */, 0, 0); + } + else + { + vnet_feature_enable_disable ("ip4-unicast", "ip4-dhcp-client-detect", + clib_net_to_host_u32 (mp->sw_if_index), + 0 /* disable */, 0, 0); + } + + BAD_SW_IF_INDEX_LABEL; + + REPLY_MACRO (VL_API_DHCP_CLIENT_DETECT_ENABLE_DISABLE_REPLY); +} static uword dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)