Add OpenWRT ubus patch
Originally written by John Crispin <john@phrozen.org>
diff --git a/src/rfc2131.c b/src/rfc2131.c
index 5416f3e..8c418da 100644
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -1636,6 +1636,13 @@
daemon->namebuff,
string ? string : "",
err ? err : "");
+
+#ifdef HAVE_UBUS
+ if (!strcmp(type, "DHCPACK"))
+ ubus_event_bcast("dhcp.ack", daemon->namebuff, addr ? inet_ntoa(a) : NULL, string ? string : NULL, interface);
+ else if (!strcmp(type, "DHCPRELEASE"))
+ ubus_event_bcast("dhcp.release", daemon->namebuff, addr ? inet_ntoa(a) : NULL, string ? string : NULL, interface);
+#endif
}
static void log_options(unsigned char *start, u32 xid)