ubus: fix invalid ipv6-prefix json "ipv6-prefix": [ { "<some ipv6 address>", "preferred-lifetime": 37979, "valid-lifetime": 48779, "prefix-length": 63 } ], json object is missing key, set address as key name. Line up DHCPv4 lease json info by using key name "address" Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
odhcpd: Replace strerror(errno) with %m format Saves a few bytes. Signed-off-by: Rosen Penev <rosenp@gmail.com>
dhcpv4: notify DHCP ACK and RELEASE via ubus If the ubus object has any subscription notify DHCP ACK and DHCP RELEASE events using ubus notifications. Signed-off-by: Borja Salazar <borja.salazar@fon.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
treewide: align function naming Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
dhcpv4: force renew nonce authentication support Support force renew nonce authentication support in the DHCPv4 server as described in RFC3203 and RFC6704. The interface uci arameter dhcpv4_forcereconf allows to supports DHCPv4 clients which support force renew without authentication. While at it align network byte order logic for simplicity. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
ubus: display accept reconf status for DHCPv6 assignments Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
treewide: replace RELAYD prefix naming in macros Remove the unfortunate RELAYD naming in the different macros Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
ubus: don't segfault when there're no leases Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
ubus: rework dumping IPv6 and IPv4 leases Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
ndp: keep an exact copy of IPv6 interface addresses Don't reset the final 32 bit IPv6 host suffix when storing the IPv6 addresses in the interface structure. This will allow exact lookup aand return of IPv6 addresses stored in the interface structure when needed. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
odhcpd: Display infinite valid lifetime as -1 Display infinite valid lifetime as -1 both in ubus and statefile Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
ubus: Fix displayed valid paramater for both DHCPv4 and DHCPv6 lease Fix ubus valid parameter being displayed as a negative number; also display infinite lifetime as INT32_MAX Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
config: blobmsg_check_attr expects bool type as last argument Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Revert "RFC: dhcpv4 support openwrt alias ip addr"
dhcpv4: remove unused addr_attrs struct Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
dhcpv4: fix char ubus_get_address4 int ubus_get_mask4 function Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
dhcpv4: return pointer Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
dhcpv4: add for_each ipv4-address array in ubus_get_address4 ubus_get_mask4 function Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
dhcpv4: add ubus_get_address4 ubus_get_mask4 function Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
dhcpv4: read ipv4-address from UBUS to ADDRESS4 Signed-off-by: Patrick Grimm <patrick@lunatiki.de>