Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'
[vpp.git] / src / vpp-api / vom / dhcp_config_cmds.cpp
index 8e81a27..76ce58b 100644 (file)
@@ -23,11 +23,13 @@ namespace dhcp_config_cmds {
 bind_cmd::bind_cmd(HW::item<bool>& item,
                    const handle_t& itf,
                    const std::string& hostname,
-                   const l2_address_t& client_id)
+                   const l2_address_t& client_id,
+                   bool set_broadcast_flag)
   : rpc_cmd(item)
   , m_itf(itf)
   , m_hostname(hostname)
   , m_client_id(client_id)
+  , m_set_broadcast_flag(set_broadcast_flag)
 {
 }
 
@@ -47,7 +49,9 @@ bind_cmd::issue(connection& con)
   payload.is_add = 1;
   payload.pid = getpid();
   payload.want_dhcp_event = 1;
+  payload.set_broadcast_flag = m_set_broadcast_flag;
 
+  memset(payload.hostname, 0, sizeof(payload.hostname));
   memcpy(payload.hostname, m_hostname.c_str(),
          std::min(sizeof(payload.hostname), m_hostname.length()));
 
@@ -137,14 +141,14 @@ rc_t
 events_cmd::issue(connection& con)
 {
   /*
- * Set the call back to handle DHCP complete envets.
- */
  * Set the call back to handle DHCP complete envets.
  */
   m_reg.reset(new reg_t(con.ctx(), std::ref(*this)));
 
   /*
- * return in-progress so the command stays in the pending list.
- */
-  return (rc_t::INPROGRESS);
  * return in-progress so the command stays in the pending list.
  */
+  return (rc_t::OK);
 }
 
 void