projects
/
oweals
/
odhcpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dhcpv4: force renew nonce authentication support
[oweals/odhcpd.git]
/
src
/
ubus.c
diff --git
a/src/ubus.c
b/src/ubus.c
index 2ffa4e319075d2b87ca17eddfbe7f90d60a39433..6fbb98ff8fddb91418c2f72af0ca01138d376c55 100644
(file)
--- a/
src/ubus.c
+++ b/
src/ubus.c
@@
-45,6
+45,7
@@
static int handle_dhcpv4_leases(struct ubus_context *ctx, _unused struct ubus_ob
blobmsg_add_string_buffer(&b);
blobmsg_add_string(&b, "hostname", (c->hostname) ? c->hostname : "");
blobmsg_add_string_buffer(&b);
blobmsg_add_string(&b, "hostname", (c->hostname) ? c->hostname : "");
+ blobmsg_add_u8(&b, "accept-reconf-nonce", c->accept_fr_nonce);
m = blobmsg_open_array(&b, "flags");
if (c->flags & OAF_BOUND)
m = blobmsg_open_array(&b, "flags");
if (c->flags & OAF_BOUND)
@@
-55,7
+56,7
@@
static int handle_dhcpv4_leases(struct ubus_context *ctx, _unused struct ubus_ob
blobmsg_close_array(&b, m);
buf = blobmsg_alloc_string_buffer(&b, "ip", INET_ADDRSTRLEN);
blobmsg_close_array(&b, m);
buf = blobmsg_alloc_string_buffer(&b, "ip", INET_ADDRSTRLEN);
- struct in_addr addr = {
htonl(c->addr)
};
+ struct in_addr addr = {
.s_addr = c->addr
};
inet_ntop(AF_INET, &addr, buf, INET_ADDRSTRLEN);
blobmsg_add_string_buffer(&b);
inet_ntop(AF_INET, &addr, buf, INET_ADDRSTRLEN);
blobmsg_add_string_buffer(&b);