From 8d777d12186bb6d5dc4c39e5ccbe50a164ea547c Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 15 Aug 2021 11:51:22 +0200 Subject: WIP dnsupdate --- src/dhcpv4.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dhcpv4.c') diff --git a/src/dhcpv4.c b/src/dhcpv4.c index a3b0e33..4bab081 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -917,6 +917,10 @@ void dhcpv4_handle_msg(void *addr, void *data, size_t len, ubus_bcast_dhcp_event("dhcp.ack", req->chaddr, req->hlen, &reply.yiaddr, a ? a->hostname : NULL, iface->ifname); #endif + if (msg == DHCPV4_MSG_ACK) { + dns_update_rr(a ? a->hostname : NULL, AF_INET, &reply.yiaddr); + dns_update_finish(); + } } static bool dhcpv4_insert_assignment(struct list_head *list, struct dhcp_assignment *a, -- cgit v1.2.3