summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dhcpv4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c
index c3d16f5..a3b0e33 100644
--- a/src/dhcpv4.c
+++ b/src/dhcpv4.c
@@ -758,7 +758,7 @@ void dhcpv4_handle_msg(void *addr, void *data, size_t len,
#ifdef WITH_UBUS
if (reqmsg == DHCPV4_MSG_RELEASE)
ubus_bcast_dhcp_event("dhcp.release", req->chaddr, req->hlen,
- &req->ciaddr, hostname, iface->ifname);
+ &req->ciaddr, a ? a->hostname : NULL, iface->ifname);
#endif
if (reqmsg == DHCPV4_MSG_DECLINE || reqmsg == DHCPV4_MSG_RELEASE)
return;
@@ -915,7 +915,7 @@ void dhcpv4_handle_msg(void *addr, void *data, size_t len,
#ifdef WITH_UBUS
if (msg == DHCPV4_MSG_ACK)
ubus_bcast_dhcp_event("dhcp.ack", req->chaddr, req->hlen, &reply.yiaddr,
- hostname, iface->ifname);
+ a ? a->hostname : NULL, iface->ifname);
#endif
}