The diagnostics page is using `fs.exec()` to execute command, which blocks
until command exit. Users have to wait for a while to see the result.
When doing IPv6 traceroute, this may cause XHR timeout, if target host
is unreachable. (See issue #7210)
This commit uses new `responseProgress` callback and `stderr` option
added in luci.js and fs.js to update command output.
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
Link: https://github.com/openwrt/luci/pull/7920
We already show the DUID in one table (in the overview), this makes the
tables under the "DHCP > Leases" tab consistent with the overview, and
exposes the DUID/IAID in both.
Signed-off-by: David Härdeman <david@hardeman.nu>
This adds support to LuCI for showing the interface which a given lease
corresponds to (assuming that odhcpd is providing the DHCPv4/6 services,
which the code also checks for).
Signed-off-by: David Härdeman <david@hardeman.nu>
Shorten the lease time description (the header of the tables already
says it contains DHCP leases, so "Remaining Time" is enough), make it
clear that we have DHCPv4/6 leases and not DHCP/DHCPv6 leases.
Signed-off-by: David Härdeman <david@hardeman.nu>
This adds support for the IPv6-only preferred (RFC8925) option to LuCI.
The option is supported by odhcpd since commit
338ca8abb950e4e0448a13d50d6d6567a167d016
Signed-off-by: David Härdeman <david@hardeman.nu>
With OpenWRT commit [1], the default for reassociation_deadline
is now 20000. Update LuCI to reflect that change.
[1]: a7790ce410
Signed-off-by: Rany Hany <rany_hany@riseup.net>
'Addresses' option entries in the general tab of DHCP and DNS settings are
sometimes (I'm not sure about the exact conditions) passed to upstream resolver,
bypassing local resolution.
A workaround for a small list of domains is to add them to 'Resolve these
locally' option, but this is very tedious to do, and dnsmasq limits it to 1024
characters.
openwrt/openwrt#18610 adds behaviour to add addresses to the local resolution
list automatically, and this commit adds a flag to LuCI to control that.
Signed-off-by: Marko Zajc <marko@zajc.tel>
Dynamically find the mode and bssid position assignments in case their position
should change later.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
First check the features are installed. Further, verify that some sections
exist which some GUI functions depend on.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Previously it was bound to IP properties when we want to verify whether the MAC
is in use elsewhere.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This limits dnsmasq to listen on specific IPs, when an interface might have
multiple IPs.
Closes#6959
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
These options are RA configuration so they should be put under the
IPv6-RA tab instead of the "generic" IPv6 tab.
Also make them depend on RA server/hybrid mode as these values are
pointless without RA server enabled.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This option is used by odhcpd. It can take IPv4/6 entries, although IPv4 DNS
servers don't always make sense in an IPv6 environment, they might in a dual
stack environment. Entering an IPv4 here results in its distribution via IPv6.
This option becomes more useful for both families when odhcpd handles IPv4+6.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
The "Set up DHCP Server" button is meant to setup the basics for a DHCP server
on the given interface. Add odhcpd setting "dhcpv4" as well. It is a no-op in
case odhcpd isn't setup to take care of DHCPv4 as well, but it makes it easier
to support either dnsmasq or odhpcd as the DHCPv4 server.
One might argue that the button should also set dhcpv6=server and ra=server, so
that it doesn't only setup a DHCPv4 server, but also prepares a DHCPv6 server,
but that's for another PR :)
Signed-off-by: David Härdeman <david@hardeman.nu>
Change the getDUIDHints RPC method to return "DUID%IAID" hints (if the IAID is
known, which it is with odhcpd). Use the complete hints in luci-mod-network.
Signed-off-by: David Härdeman <david@hardeman.nu>
I've tried to make this more consistent by using "for" to describe values
that are assigned to the host by the DHCP server and "of" to describe values
that are provided by the host to the DHCP server.
Signed-off-by: David Härdeman <david@hardeman.nu>
Simplify the help text a bit, make it more consistent, capitalize "MAC", remove
references to dnsmasq.
Signed-off-by: David Härdeman <david@hardeman.nu>
Make it clearer that a single DHCPv6 lease can encompass several IPv6
addresses, e.g. when GUA and ULA prefixes are available.
Signed-off-by: David Härdeman <david@hardeman.nu>
Create three main tabs ("dnsmasq", "odhcpd", "Leases") in dhcp.js and
sort the previous tabs under these main tabs.
Signed-off-by: David Härdeman <david@hardeman.nu>
This makes it clearer which daemon each part belongs to. But more
importantly, it lays the ground for the next patch.
Signed-off-by: David Härdeman <david@hardeman.nu>
This makes it a bit clearer what is specific to leases and also
prepares for the following patches. No actual code changes.
Signed-off-by: David Härdeman <david@hardeman.nu>
This makes it a bit clearer what is specific to dnsmasq and also
prepares for the following patches. No actual code changes.
Signed-off-by: David Härdeman <david@hardeman.nu>
cbi_update_table() can already take a string suitable for
.querySelector() as its first argument. In addition, it will do the
right thing if the element isn't found, so this can be simplified a bit.
Signed-off-by: David Härdeman <david@hardeman.nu>
The single user isn't really enough to warrant this function, so remove
it to prepare for the following patches.
Signed-off-by: David Härdeman <david@hardeman.nu>