mactime: add a "top" command to watch device stats
[vpp.git] / src / vnet / dhcp / dhcp6_ia_na_client_cp.c
index e83eecc..e440805 100644 (file)
@@ -214,7 +214,7 @@ dhcp6_reply_event_handler (vl_api_dhcp6_reply_event_t * mp)
   inner_status_code = ntohs (mp->inner_status_code);
   status_code = ntohs (mp->status_code);
 
-  if (mp->msg_type == DHCPV6_MSG_ADVERTISE
+  if (mp->msg_type == DHCPV6_MSG_API_ADVERTISE
       && client_state->server_index == ~0)
     {
       address_info_t *address_list = 0, *address_info;
@@ -246,7 +246,7 @@ dhcp6_reply_event_handler (vl_api_dhcp6_reply_event_t * mp)
       vec_free (address_list);
     }
 
-  if (mp->msg_type != DHCPV6_MSG_REPLY)
+  if (mp->msg_type != DHCPV6_MSG_API_REPLY)
     return 0;
 
   if (!client_state->rebinding && client_state->server_index != server_index)
@@ -712,22 +712,28 @@ dhcp6_client_enable_disable_command_fn (vlib_main_t * vm,
   clib_error_t *error = 0;
   u32 sw_if_index = ~0;
   u8 enable = 1;
+  unformat_input_t _line_input, *line_input = &_line_input;
 
-  while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+  if (!unformat_user (input, unformat_line_input, line_input))
+    return 0;
+
+  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat
-         (input, "%U", unformat_vnet_sw_interface, vnm, &sw_if_index))
+         (line_input, "%U", unformat_vnet_sw_interface, vnm, &sw_if_index))
        ;
-      else if (unformat (input, "disable"))
+      else if (unformat (line_input, "disable"))
        enable = 0;
       else
        {
          error = clib_error_return (0, "unexpected input `%U'",
-                                    format_unformat_error, input);
+                                    format_unformat_error, line_input);
          goto done;
        }
     }
 
+  unformat_free (line_input);
+
   if (sw_if_index != ~0)
     {
       if (dhcp6_client_enable_disable (sw_if_index, enable) != 0)