aboutsummaryrefslogtreecommitdiffstats
path: root/extras/vom
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vom')
-rw-r--r--extras/vom/vom/dhcp_client.cpp7
-rw-r--r--extras/vom/vom/dhcp_client_cmds.cpp7
2 files changed, 8 insertions, 6 deletions
diff --git a/extras/vom/vom/dhcp_client.cpp b/extras/vom/vom/dhcp_client.cpp
index e3a5b9d5559..23911b3df0e 100644
--- a/extras/vom/vom/dhcp_client.cpp
+++ b/extras/vom/vom/dhcp_client.cpp
@@ -278,7 +278,8 @@ dhcp_client::event_handler::handle_populate(const client_db::key_t& key)
const dhcp_client::state_t& s =
dhcp_client::state_t::from_vpp(payload.lease.state);
- route::prefix_t pfx(payload.lease.is_ipv6, payload.lease.host_address,
+ route::prefix_t pfx(payload.lease.is_ipv6,
+ (uint8_t*)&payload.lease.host_address.un,
payload.lease.mask_width);
std::string hostname =
reinterpret_cast<const char*>(payload.lease.hostname);
@@ -286,8 +287,8 @@ dhcp_client::event_handler::handle_populate(const client_db::key_t& key)
dhcp_client dc(*itf, hostname, l2, payload.client.set_broadcast_flag,
from_api(payload.client.dscp));
dc.lease(std::make_shared<dhcp_client::lease_t>(
- s, itf, from_bytes(0, payload.lease.router_address), pfx, hostname,
- mac_address_t(payload.lease.host_mac)));
+ s, itf, from_bytes(0, (uint8_t*)&payload.lease.router_address.un), pfx,
+ hostname, mac_address_t(payload.lease.host_mac)));
OM::commit(key, dc);
}
}
diff --git a/extras/vom/vom/dhcp_client_cmds.cpp b/extras/vom/vom/dhcp_client_cmds.cpp
index c1d4d49a495..3f899a63c01 100644
--- a/extras/vom/vom/dhcp_client_cmds.cpp
+++ b/extras/vom/vom/dhcp_client_cmds.cpp
@@ -173,15 +173,16 @@ events_cmd::notify()
const dhcp_client::state_t& s =
dhcp_client::state_t::from_vpp(payload.lease.state);
- route::prefix_t pfx(payload.lease.is_ipv6, payload.lease.host_address,
+ route::prefix_t pfx(payload.lease.is_ipv6,
+ (uint8_t*)&payload.lease.host_address.un,
payload.lease.mask_width);
std::shared_ptr<interface> itf = interface::find(payload.lease.sw_if_index);
if (itf) {
std::shared_ptr<dhcp_client::lease_t> ev =
std::make_shared<dhcp_client::lease_t>(
- s, itf, from_bytes(0, payload.lease.router_address), pfx,
- reinterpret_cast<const char*>(payload.lease.hostname),
+ s, itf, from_bytes(0, (uint8_t*)&payload.lease.router_address.un),
+ pfx, reinterpret_cast<const char*>(payload.lease.hostname),
mac_address_t(payload.lease.host_mac));
m_listener.handle_dhcp_event(ev);