The DHCPv4 table already calls it "Hostname", and so do the DHCPv[46]
tables in luci-mod-network, so rename this one as well for consistency.
Note that "Hostname" is already used elsewhere, so this shouldn't cause
translation issues (I think).
Signed-off-by: David Härdeman <david@hardeman.nu>
Provides odhcp6c statistics of DHCPv6 request and response traffic,
for dhcpv6 client interfaces only.
This appends to IPv6 Upstream network interface boxes:
DHCPv6 solicit: x pkts
DHCPv6 advertise: x pkts
DHCPv6 request: x pkts
DHCPv6 confirm: x pkts
...
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
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>
Refine legacy rule detection to avoid false positives generated by the
iptables-nft compatibility layer on fw4 systems.
The logic now prioritizes `iptables-legacy-save` for accuracy, while
retaining `iptables-save` as a fallback to ensure backward
compatibility with fw3.
Signed-off-by: Tokisaki-Galaxy <starmaster@outlook.sg>
Note that "duid" from UCI can be *either* "<DUID>" or "<DUID>%<IAID>",
so update the code to handle both cases.
Also, make sure the "Reserve IP" button is disabled if the "duid" is
unknown (can only happen if dnsmasq is responsible for DHCPv6) and that
DUIDs/IAIDs are always rendered in lowercase in the UI.
Signed-off-by: David Härdeman <david@hardeman.nu>
Note that we might not have a MAC address to set in case of a DHCPv6
lease when the DUID is of a type which isn't MAC-based.
Signed-off-by: David Härdeman <david@hardeman.nu>
Multiple DUIDs can be defined for one static lease, and using an
"option" instead of a "list" in UCI is legacy, so store the DUID as a
list for correctness.
Signed-off-by: David Härdeman <david@hardeman.nu>
Add support for creating DUID%IAID style static leases in luci-mod-status.
Also, this contains a bugfix. lease.ip6addrs[i] is a string of the format
"<ipv6addr>/128", which validation.parseIPv6() doesn't like (it expects an IPv6
addr without the "/128" suffix).
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>
The current handling method introduces extraneous spaces into the translations.
For instance, 'System Log', which is correctly translated to Japanese as 'システムログ' (without extra spaces), is being displayed as 'システム ログ' under the current approach.
Other CJK/Southeast Asian languages are experiencing similar issues, including Chinese, Thai, and Lao.
Therefore, these elements should be translated together as a single unit, rather than separately.
Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
follow-up to 788e47034b
Some of the CSS changes have knock-on effects and change behaviour in
other display areas, especially when the CSS is minified.
Simplified to change between label flavours on hide/show status.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
As part of the commit adding MAC vendor identification (PR #7931), and
subsequent fixups, parseRoutes() grew an unused macs argument.
Signed-off-by: David Härdeman <david@hardeman.nu>
Right now, the checkUfpInstalled RPC call is performed first, and only after
that can the other Promises be called. Simplify this by adding a single check
for /usr/sbin/ufpd in the rpcd ucode, and replace calls to checkUfpInstalled()
with simple L.hasSystemFeature('ufpd') check (which is only done once, and
cached).
This also allows the 'stat' permission to be removed from a couple of acls.
Signed-off-by: David Härdeman <david@hardeman.nu>
These appear when modules such as the following are installed:
-kmod-nf-nathelper
-kmod-nf-nathelper-extra
They render as e.g.:
Utilise *ftp* conntrack helper
when fw4 rules similar to the following exist
```
table inet fw4 {
chain helper_lan {
tcp dport 21 ct helper set "ftp" comment "!fw4: FTP passive connection tracking"
}
}
```
ht @dave14305 for the working code diff
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Refactor functions and variables to ES6 standard.
Detect whether one of the JSON enabled ip variants is installed, and
prefer it to display route information over the text handling. This is
handled by the acls and menu depends.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
- Support vmaps
- Support goto, continue actions
- Recognize DSCP and MAC address expressions
- Support log action without prefix.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Fall through to /usr/sbin/conntrack tool if /proc/net/nf_conntrack or
ip_conntrack is not available.
/proc/net/nf_conntrack has been obsoleted in recent kernels
(https://cateee.net/lkddb/web-lkddb/NF_CONNTRACK_PROCFS.html). This
change enables luci-bwc to collect conntrack information via the
/usr/sbin/conntrack tool (if installed) instead.
Populates the /luci/admin/status/realtime/connections chart.
Signed-off-by: James Fox <jpfox156@yahoo.com.au>
[ format using tabs ]
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Add support to show/hide index cards. A card's state is saved using the
browser localstorage and its state is restored on page reload/relogin.
Rework the pool function to check and skip loading of hidden cards.
Rework themes to address new button position.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[ changed tabs in CSS ]
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Reorganize poll function for index page. Drop the external function and
use the poll_status pattern used in other page that use poll.add API.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
In the overview page are all active dhcp leases displayed.
For easier recognition, the listed MAC addresses fo these leases are
resolved to their vendor names.
Signed-off-by: Christian Korber <ck@dev.tdt.de>
For easier definition of connected devices, this commit adds support
to identify them by vendor name.
Package `upf-neigh` is needed to lookup the vendor name in a hash table.
It implements a ubus-call `ubus call fingerprint fingerprint`:
```
root@<redacted> ~ # ubus call fingerprint fingerprint
{
"7c:c2:55:XX:XX:XX": {
"vendor": "Super Micro Computer, Inc."
}
}
```
Fixes: #2065
Depends on: openwrt/packages#27257
Signed-off-by: Christian Korber <ck@dev.tdt.de>
The IAID is important information as it allows the user to know which
interface on the client device a given DHCPv6 lease corresponds to.
odhcpd already exposes this information (e.g. via "ubus call dhcp
ipv6leases"), but it would be good to have access to the same
information via the web interface, especially since odhcpd does take the
IAID into account when allocating addresses.
Signed-off-by: David Härdeman <david@hardeman.nu>
Fixed bug in syslog.js where lines could be hidden even when "any" was selected, and simplified code a bit.
Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>