Commit graph

251 commits

Author SHA1 Message Date
Rafał Miłecki
398932f39b luci-mod-network: drop 2 unused variables
Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-20 14:04:46 +02:00
Rafał Miłecki
907b4222f7 luci-mod-network: don't hide "Device" on protocol change
Device ("ifname" UCI option) doesn't depend on protocol so there is no
need to hide / reset it on protocol change.

While at it drop names of two removed inputs (dead code).

Fixes: ec020cee0c ("luci-mod-network: drop support for *editing* legacy bridges")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-20 14:04:34 +02:00
Rafał Miłecki
bca76a7673 luci-mod-network: add bridge interface migration
LuCI now supports the updated UCI syntax for bridges that requires:
1. device section for L2
2. interface section for L3

Check for legacy syntax usage and offser user a migration to allow
changing network config.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-18 20:11:22 +02:00
Rafał Miłecki
a90115cd82 luci-mod-network: use "ports" option for setting bridge ports
netifd has been recently patched to use more accurate "ports" option
instead of "ifname"

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-18 20:09:47 +02:00
Rafał Miłecki
ec020cee0c luci-mod-network: drop support for *editing* legacy bridges
The old way of defining bridge (L2) as part of interface (L3) is
deprecated. All such configs should be migrated to define bridge as L3
UCI section type "device".

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-18 20:09:40 +02:00
Rafał Miłecki
b7f3cf66ca luci-mod-network: drop support for *adding* legacy bridges
The old way of defining bridge (L2) as part of interface (L3) is
deprecated. Don't support *adding* interfaces like that.

Support for *editing* legacy bridges is kept for now for compatibility
with existing legacy setups.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-18 12:38:26 +02:00
Michael Pratt
51ab737a4b luci-mod-network: do not remove enable_vlan from config
There are many switch drivers where VLAN functionality is enabled by default.
In this situation, LuCI cannot be used to disable VLAN functionality,
because removing the line from configuration results in VLAN remaining enabled
by the driver.

When enable_vlan is set to 0 by default
by using functions in board.d,
and an unrelated change is made on the Switch webpage,
then the enable_vlan option gets deleted when changes are saved.

Therefore, the option needs to be preserved, whether set to 0 or 1.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-04-21 18:12:43 -04:00
Hannu Nyman
b7dd10da0f luci-mod-network: fix handling of optional RA/NDP options
Fix the handling of optional IPv6 RA and NDP options
that were exposed to LuCI with 504bdb23f

Commit 504bdb23f defined them optional but provided default values.
Those values might get unnecessarily written to /etc/config dhcp when
the the user modifies some other values. Remove the default values,
but provide placeholder for some of them.

Add the missing optional definition to 'ndproxy_routing'.
(It is a flag, so optional default values do not get written to
the config file.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-04-20 21:06:42 +03:00
Dirk Brenken
2617fcdc63 luci-mod-network: fix xhtml markup
* fix markup in interfaces.js (#4980)
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-04-14 16:49:30 +03:00
Anton Kikin
bfe8a01040 luci-mod-network: Support for disabling routes
Support for disabling routes in netifd was added in commit [1]. This commit
adds support for disabling routes through the LuCI interface.

Additionally hidden the route options descriptions in the header of the
routes table (they are still available in the modal view).

[1]: https://git.openwrt.org/?p=project/netifd.git;a=commit;h=327da9895327bc56b23413ee91a6e6b6e0e4329d

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2021-04-06 04:40:02 +03:00
Paul Dee
504bdb23fb luci-mod-network: Introduce new RA and NDP params with help-text.
New: Router Advertisement parameters and accompanying help-text.
New: 3 additional NDP options and accompanying help-text.

Until now, some of the IPv6 settings are mysterious. They are now
clarified. The information is accessible to IPv6 beginners.

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2021-04-01 22:03:34 +02:00
Paul Dee
988c98bdc6 luci-mod-network: Add help text for many existing odhcpd IPv6 parameters
and Global network options ULA.

Relocated the "DHCPv6 Mode" to below RA-Service: DHCPv6-Mode is actually
ra_management in disguise. Better grouping.

Until now, some of the IPv6 settings are mysterious. They are now
clarified. The information is accessible to IPv6 beginners.

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2021-04-01 21:56:27 +02:00
Jo-Philipp Wich
2072c66c5a luci-mod-network: fix device section cleanup
Ensure that device sections are only automatically removed after all
related options have been parsed, to avoid prematurely deleting sections.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 22:35:50 +02:00
Jo-Philipp Wich
935e9a3c34 luci-mod-network: allow disabling interface->device option migration
Introduce a `migrate` properties which selectively allows disabling the
`config interface` to `config device` migration logic for single options.

Use the new flag to disable migration of the "ipv6" option which has
different semantics in interface and device sections.

Ref: https://forum.openwrt.org/t/pppoe-disable-ipv6/92548
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 22:35:10 +02:00
Jo-Philipp Wich
7dde01be3c luci-mod-network: fix changing ifname in disabled legacy bridge mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 16:33:07 +02:00
Jo-Philipp Wich
f48f9f11e7 luci-mod-network: make condition for disabling legacy bridging more specific
Only disable legacy bridging if an existing network.device section with type
bridge is found, ignore non-type sections since those do not declare a
bridge but set attributes on top of an existing one.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 16:30:32 +02:00
Jo-Philipp Wich
b9fad85f2e luci-mod-network: fix unsetting network.device options
The existing logic only handled removing the last remaining device section
option (which results in the deletion of the entire section) but failed to
actually unset single options.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 16:27:47 +02:00
Jo-Philipp Wich
a9a223b973 luci-mod-network: don't implicitly move bridge opts into device sections
When setting bridge and device specific options such 'stp' or
'igmp_snooping', LuCI so far transparently created or reused a
`config device` section and set the corresponding option there.

In the case of bridges, this triggers multiple problems:

 - When implicitely creating a `config device` section referring to the
   bridge device, the legacy bridge configuration of the corresponding
   interface is disabled, causing a broken configuration on subsequent
   save operations

 - Netifd does not appear to properly merge bridge settings from config
   device and config interface sections, leading to an incoherent
   configuration state

In order to avoid that issue, do not automatically migrate bridge specific
options.

Fixes: #4948
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 16:00:10 +02:00
Jo-Philipp Wich
9a92f9c761 luci-mod-network: fix handling of peerdns/dns/dns_search options
The previous change didn't take dynamic dependency mangling into account.

Fixes: 2bfd4908a9 ("luci-mod-network: restore DNS option semantics for proto static")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-21 00:50:27 +01:00
Jo-Philipp Wich
2bfd4908a9 luci-mod-network: restore DNS option semantics for proto static
The peerdns settings makes little practical sense for proto:static
interfaces, so revert to allow setting the DNS server list directly.

Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-21 00:36:24 +01:00
Jo-Philipp Wich
edf640af58 luci-mod-network: fix legacy bridge configuration
Ref: https://github.com/openwrt/luci/pull/4307#issuecomment-803432603
Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-21 00:19:55 +01:00
Jo-Philipp Wich
1c4284150d luci-mod-network: fix invalid variable access when creating interfaces
Fixes: eeef38d534 ("luci-mod-network: add support for bridge vlan filtering")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-21 00:17:35 +01:00
Jo-Philipp Wich
bea7b8dc7c luci-mod-network: fix opacity for device icon tooltips
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-18 17:28:41 +01:00
Jo-Philipp Wich
14fdce0fcd luci-mod-network: tools.network: handle bridge config and vlan corner cases
- Disable interface-level bridging if a corresponding br-$name bridge
   already exists as device declaration

 - Exempt wireless interfaces from bridge port configuration, they can only
   be attached indirectly through "option network"

 - Consider bridge ports from both "option ifname" in interface/device
   sections and from "option ports" in bridge-vlan ones

 - Small fixes for rendering quirks

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-18 17:28:40 +01:00
Jo-Philipp Wich
3b4c161e01 luci-mod-network: allow wifi bridging with bridge or bridge vlan ifaces
Recent netifd automatically adds wireless devices as bridge ports if the
layer 2 device referenced by the "config interface" target network is a
Linux network bridge or a VLAN interface on top of a network bridge.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-18 17:28:40 +01:00
Jo-Philipp Wich
4cde2bda73
Merge pull request #4307 from jow-/uci-network-device-support
Introduce support for managing `config device` and `config bridge-vlan` sections
2021-03-18 17:27:31 +01:00
Florian Eckert
811225156a
Merge pull request #4709 from opastushkov/dnsmasq_crash_on_duplication_of_static_ip
luci-mod-network: issue with breakdown of dnsmasq after duplication o…
2021-03-17 08:55:09 +01:00
Jo-Philipp Wich
eeef38d534 luci-mod-network: add support for bridge vlan filtering
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15 11:40:30 +01:00
Jo-Philipp Wich
faad7464a8 luci-mod-network: add support for network.device sections
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15 11:40:30 +01:00
Jo-Philipp Wich
069a97e55c luci-mod-network: interfaces.js: simplify some code using new ui helpers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15 11:40:30 +01:00
Giovanni Giacobbi
af422b1924 treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
2021-01-20 17:48:16 +02:00
Oleksandr Pastushkov
463e910119 luci-mod-network: issue with breakdown of dnsmasq after duplication of static IP was fixed
Before this commit, assigning the same static IP address to two
different hosts disabled dnsmasq.

Logic of adding a new static lease was modified. If user try to assign a
new MAC address to already reserved IP, old lease will be modified (list
of MAC addresses will be extended by new MAC) instead of creation a new lease with the same IP.

Signed-off-by: Oleksandr Pastushkov <oleks.pastushkov@gmail.com>
2021-01-04 02:07:45 +02:00
Hannu Nyman
e609ef0ef5 luci-mod-network: modernize 802.11w help text
Modernize the 802.11w help text as support for 802.11w is
currently always compiled into hostapd/wpad and most of
the relevant wireless drivers support it well.

Add a cautionary note that some drivers do not fully support
it. Mention mwlwifi by name as it has several 802.11w bugs
open in upstream and its development has stopped.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-01-02 15:20:18 +02:00
Dobroslaw Kijowski
ab01040663 luci-mod-network: skip check for 802.11w feature
OpenWrt commit 1a9b896d ("treewide: nuke DRIVER_11W_SUPPORT") enables
802.11w feature for all wpad/hostapd configurations. The feature flag
was removed at all but for the compatibility reasons 11w is still
advertised (but there's a plan to nuke it also) [1].

Remove conditional 802.11w LuCI support to match current behavior.

[1]: https://github.com/openwrt/openwrt/pull/3347

Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
2021-01-02 14:59:25 +02:00
Jo-Philipp Wich
f3417f2871 luci-mod-network: restrict legacy_rates option to hwmode 11g
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-12-23 19:02:38 +01:00
Florian Eckert
5a021f8419
Merge pull request #4649 from nicklowe/master
luci-mod-network Add description: Hidden SSID, WMM
2020-12-21 11:25:58 +01:00
Jo-Philipp Wich
7b5b7fbcd6 luci-mod-network: properly handle wireless devices when adding interfaces
Wireless device names must not be added as list/option ifname, but the
network must be backreferenced in config wifi-iface instead in these
cases.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-12-12 12:16:45 +01:00
Nick Lowe
9060c12915 luci-mod-network Add description: Hidden SSID, WMM
luci-mod-network Describe issues: Hidden SSID, WMM

The performance and reliability implications of hiding SSIDs or disabling
WMM are not commonly known and these settings often end up being
misconfigured to harmful effect.

To seek to mitigate this, add descriptions explaining that:

Where the ESSID is hidden, clients may fail to roam and airtime efficiency
may be significantly reduced.

Where Wi-Fi Multimedia (WMM) Mode QoS is disabled, clients may be limited
to 802.11a/802.11g rates.

Signed-off-by: Nick Lowe <nick.lowe@gmail.com>
2020-12-09 16:15:07 +00:00
Nick Lowe
ec49f3b546 luci-mod-network: wireless.js Disable 802.11b by default
The time has long come where 802.11b DSSS/CCK data rates should be disabled
By default in OpenWRT. Users in need of 802.11b client support can reasonably
enable these where they are needed.

The balance of equities has significantly, and for a long time, tipped
such that dropping backwards compatibility by default with 802.11b
devices is appropriate, proportionate and justified. By doing so,
management and control traffic is moved by default to a 20
MHz wide 6 Mb/s OFDM data rate instead of a 22 MHz wide 1 Mb/s DSSS data
rate. This is significantly more airtime efficient.

For discoverability:
1) Move the option from the Advanced Settings to the General Setup tab.
2) Add a description explaining potential compatibility implications.

Signed-off-by: Nick Lowe <nick.lowe@gmail.com>
2020-12-06 08:53:08 -10:00
Nick Lowe
f5c04e1a2e luci-mod-network: wireless.js cell_density support
Add support for the cell_density option added to OpenWRT via commit:
81ff23fc91dbbedc374e58afdb4b0b13146c0f15

This configures data rates based on the coverage cell density.
Normal configures basic rates to 6, 12, 24 Mbps if legacy 802.11b rates
are not used else to 5.5, 11 Mbps.
High configures basic rates to 12, 24 Mbps if legacy 802.11b rates are
not used else to the 11 Mbps rate.
Very High configures 24 Mbps as the basic rate. Supported rates lower
than the minimum basic rate are not offered.

Signed-off-by: Nick Lowe <nick.lowe@gmail.com>
2020-12-01 16:01:53 +00:00
Jo-Philipp Wich
03c77dafe3 treewide: transition div tables to actual table markup
Modern browsers allow decomposing table markup equally well as nested div
constructs, therefor migrate our <div> table markup to actual <table> tags
but keep the old table/tr/th/td CSS classes for now to allow for a smooth
theme transition.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-11-27 21:36:40 +01:00
Ansuel Smith
83c912716e
luci-mod-network: require ssid when join hidden wifi
WiFi join won't work if is tried to connect to a Hidden Wifi without specifying the WiFi SSID.

Fixes: #2085
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-11-01 19:04:06 +01:00
Jo-Philipp Wich
4e8620443d luci-mod-network: fix SAE/WPA check on network join
The method array may be null in case of an open network, also not all
occurrences of `is_sae` and `is_psk` were properly checked.

Resolve the issue by moving the length check to the variable initialization.

Fixes: ba98a2fd0 ("luci-mod-network: fix logic bug in parse enc for network join")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-11-01 18:24:13 +01:00
Jo-Philipp Wich
78645e7efe
Merge pull request #4561 from Ansuel/fix-enc-ap
Fix one display bug for ap join and #4524
2020-11-01 17:23:17 +01:00
Ansuel Smith
ba98a2fd05
luci-mod-network: fix logic bug in parse enc for network join
In handleJoinConfirm while is_wep is a boolean, is_psk and is_sae are an array. In the following if check, all 3 are used as boolean but Js treat empty array as positive values and this cause the ui to wrongly set the encryption to sae. fix this by checking if the array actually contains data.

Fixes: #4524
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-11-01 01:51:02 +01:00
Ansuel Smith
ae47a5104d
luci-mod-network: use createHanleFn for handleJoin function
handleJoin can be slow to parse all the data and show the new modal, this can result in the disappear of the scan modal and the showing of the wifi config page while the data are generating. This is wrong since a user can think that he did something wrong. Fix this by using the createHandleFn and by removing the scan pool function instead of calling ScanAbort function that with the other thing wrongly removes the Scan modal. (the modal is replaced with the add one when all the data are ready)

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-11-01 01:45:41 +01:00
Jo-Philipp Wich
40acd95726
Merge pull request #4508 from Ansuel/wpscontrol
luci-mod-status: add WPS control for wifi info
2020-10-30 21:19:40 +01:00
Martin Schiller
0f1a793aea luci-mod-network: diagnostics.js: don't pass IP version flag to ping6
Passing "-6" to ping6 from the iputils package will lead to the
following error:
	"ping6: only one -4 or -6 option may be specified"

It does not make sense either.

Fixes: 547776327a ("luci-mod-network: diagnostics.js: pass IP version flag to ping/ping6")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2020-10-14 13:12:03 +02:00
Ansuel Smith
095309cf02
luci-mod-network: check directly if hostapd supports wps
Wps Push Button feature is now supported directly from ubus instead of using hostapd_cli.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-11 01:32:21 +02:00
Ansuel Smith
6c9a6c334e
luci-mod-network: handle multiple mac for static lease
The mac section for the static lease doesn't correctly handle when multiple mac are set for a rule.
Fixes: #4291

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-08 02:43:29 +02:00
Florian Eckert
5ca328440b
Merge pull request #3265 from najdanovicivan/patch-2
luci-mod-network: add address parameter in DHCP for dnsmasq
2020-09-14 15:34:37 +02:00
Jo-Philipp Wich
84a0b6845f
Merge pull request #4127 from blocktrron/luci-wep-features
luci-mod-network: query WEP support
2020-06-16 17:01:27 +02:00
William Fleurant
547776327a luci-mod-network: diagnostics.js: pass IP version flag to ping/ping6
Signed-off-by: William Fleurant <meshnet@protonmail.com>
2020-06-12 01:54:33 -04:00
David Bauer
6c56365b82 luci-mod-network: query support for WEP
This commit removes WEP from the list of supported
encryption methods in case hostapd or wpa_supplicant
were compiled without WEP support.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-06-01 10:36:07 +02:00
Jo-Philipp Wich
01d5d5f929 luci-mod-network: allow literal "auto" value for distance
Fixes: #4050
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-17 19:36:17 +02:00
Jo-Philipp Wich
8747513951 luci-mod-network: fix reading static route table value
Ref: https://forum.openwrt.org/t/static-route-shows-incorrect-table/63514
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-13 17:20:05 +02:00
Jo-Philipp Wich
0306b14d20 luci-mod-network: wireless.js: disable action buttons on insufficient ACLs
Also implement disabled state in custom frequency select widget.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:28:21 +02:00
Jo-Philipp Wich
c63c902163 luci-mod-network: interfaces.js: disable action buttons on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:21:03 +02:00
Jo-Philipp Wich
57f27cf7f8 luci-mod-network: dhcp.js: allow lease hostname to be empty
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-11 18:34:54 +02:00
Jo-Philipp Wich
137db1c4d1 luci-mod-network: dhcp.js: fix validation logic
The `server` option allows plain IPs besides the `/domain/addr` format.

Fixes: #3870
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-11 18:27:36 +02:00
Jo-Philipp Wich
45a30c925b luci-base, luci-mod-network: adjust ZoneSelect / NetworkSelect descriptions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-07 18:19:19 +02:00
Jo-Philipp Wich
3c4bc228a1 treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 10:00:06 +02:00
Jo-Philipp Wich
eb1422defe luci-mod-network: rework signal badge disabled state
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-02 15:20:58 +02:00
Jo-Philipp Wich
515069f9ec luci-mod-wireless: avoid signal badge wrapping in scan list
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-01 19:15:07 +02:00
Jo-Philipp Wich
cae8045367 luci-mod-network: add WPA3-EAP and mixed WPA2/WPA3-EAP settings
Fixes: #3363
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-26 22:02:42 +01:00
Jo-Philipp Wich
04c73f1613 luci-mod-network, luci-mod-status: allow assoclist wrapping
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a600ebb5fe14b13cb53669eb73b86f66cc699e94)
2020-03-24 22:14:18 +01:00
Jo-Philipp Wich
98a9d07d89 luci-mod-network: dhcp.js: properly validate hostname values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 22:20:50 +01:00
Jo-Philipp Wich
1b7e923cf6 luci-mod-network: adjust assoclist markup for easier styling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 22:14:02 +01:00
Jo-Philipp Wich
41b2fe9f6b luci-mod-network: diagnostics.css: use .btn CSS class for buttons
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 21:48:13 +01:00
Alan Swanson
28ed7245be luci-mod-network: interfaces.js: add global packet steering option
Previously an undocumented "default_ps" option without a corresponding luci
entry. Hotplug script was updated in openwrt master to use "packet_steering"
as the option and now defaults to off.

Ref: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=d3868f15f876507db54afacdef22a7059011a54e
Signed-off-by: Alan Swanson <reiver@improbability.net>
2020-03-21 16:21:00 +00:00
Helge Mader
c949d116b0 luci-mod-network: extended interfaces.js for check if new interface is createable
Signed-off-by: Helge Mader <ma@dev.tdt.de>
2020-03-03 16:12:10 +01:00
Jo-Philipp Wich
1c547d36b5 luci-mod-network: switch.js: fix internal port ordering
Fixes: #3709
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-02 09:34:30 +01:00
Franco Castillo
a612574e11 luci-mod-network: fix typo
Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
2020-03-02 08:22:06 +01:00
Jo-Philipp Wich
cf09705ee3 luci-mod-network: properly handle "no signal" and "disabled" in signal badges
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-01 20:58:51 +01:00
Jo-Philipp Wich
48e18fb8ac luci-mod-network: wifi join: allow reclaiming empty wwan networks
Fixes: #3660
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-21 22:12:31 +01:00
Jo-Philipp Wich
7ec007f926 luci-mod-network: wifi join: add option to lock bssid
Fixes: #3661
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-21 21:30:06 +01:00
Jo-Philipp Wich
a2fe3d9fc4 luci-mod-network: wifi scan: add button to start/stop refreshes
Fixes: #3662
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-21 21:09:45 +01:00
Jo-Philipp Wich
9b024767d7 luci-mod-network: explicitely configure "none" encryption in wifi join
Fixes: #3663
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-21 20:54:26 +01:00
Jo-Philipp Wich
2cad20e7ea luci-mod-network, luci-mod-status: harmonize wifi signal indicators
Fixes: #3636
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-17 09:50:36 +01:00
Jo-Philipp Wich
7bc338c011 luci-mod-network: dhcp.js: adjust resolvfile placeholder to OpenWrt default
Ref: 5d15363408 (commitcomment-37059122)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-31 14:36:44 +01:00
Jo-Philipp Wich
5d15363408 luci-mod-network: dhcp.js: fix resolvefile option depends
Ref: https://forum.openwrt.org/t/resolvfile-option-not-showing/54229
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-31 11:19:09 +01:00
Jo-Philipp Wich
616d44c155 luci-mod-network: handle missing switch port state information
Ref: https://github.com/openwrt/luci/issues/3565
Ref: https://forum.openwrt.org/t/cannot-read-property-link/50766
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-28 18:16:43 +01:00
Najdanovic Ivan
8463929378 luci-mod-network: Add Address parameter in DHCP
Address is very useful in dnsmasq. I don't see a reason why we should not have it in the form

Signed-off-by: Najdanovic Ivan <najdanovicivan@gmail.com>
2020-01-17 01:33:40 +01:00
David Lam
f92e408f69
luci-mod-network: fix missing semicolons
Corrects missing semicolons from the previous commit.

Signed-off-by: David Lam <david@thedavid.net>
2020-01-16 14:51:14 -08:00
David Lam
dbc5778228
luci-mod-network: add system cert bundle validation
This commit adds the ability for users to validate against the system's
built-in CA bundle if it is installed. The process is made much easier because
the user does not have to first extract the CA certificate from the EAPOL
handshake and upload it via LuCI uploads. Dependent on commit
openwrt/openwrt#2696.

Signed-off-by: David Lam <david@thedavid.net>
2020-01-16 01:15:11 -08:00
Florian Eckert
4536a1f1a9
Merge pull request #3444 from swg0101/subjectvalidation
luci-mod-network: add certificate subj validation
2020-01-15 11:47:05 +01:00
David Lam
d9e88c2072
luci-mod-network: add certificate subj validation
This PR is tied to changes being made via openwrt/openwrt#2654, and it
allows users to provide certificate constraint(s) when connecting as a
STA to an AP using Enterprise modes. The constraints can either be
provided via the certificate's X509 subject using a substring (e.g.
/CN=wifi.mycompany.com) or subject alternate name values (e.g.
DNS:wifi.mycompany.com), although both can be combined for a stricter
validation criteria. Other options, such as wildcard and exact domain
matches are also available.

Signed-off-by: David Lam <david@thedavid.net>
2020-01-12 00:33:43 -08:00
Florian Eckert
390dc2805a
Merge pull request #3391 from TobleMiner/feature-vlan-description
luci-mod-network: Add description field to VLANs (trivial)
2020-01-03 09:55:26 +01:00
Balázs Úr
8b47bb8411 luci-base: fix typos
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2019-12-20 16:48:51 +01:00
Jo-Philipp Wich
3a657b8ab5 luci-mod-network: replace controller address check action with cgi-io script
This change removes the last bit of Lua code from luci-mod-network.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18 21:33:29 +01:00
Balázs Úr
d0bc86bcc3 luci-base: fix typos
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2019-12-17 11:41:00 +01:00
Jo-Philipp Wich
ab07b8c4d9 luci-mod-network: reimplement diagnostics page as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:07:18 +01:00
Jo-Philipp Wich
ffe81aead3 luci-mod-network: dhcp.js: fix default state of nonwildcard
Fixes: #3415
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:05:49 +01:00
Jo-Philipp Wich
3cdd496946 luci-mod-network: fix rebind list validation
Fixes: 62e28f4b0 ("luci-mod-network: dhcp.js: fix address and rebind list validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:01:50 +01:00
Jo-Philipp Wich
62e28f4b0a luci-mod-network: dhcp.js: fix address and rebind list validation
Fixes: #3130
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 17:51:45 +01:00
Jo-Philipp Wich
f6410361c8 luci-mod-network: re-add DHCPv6 lease status to dnsmasq page
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2674
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 17:40:04 +01:00
Tobias Schramm
2ab71420c3 luci-mod-network: Add description field to VLANs
Having a description attached to a VLAN makes identification a lot easier when
dealing with many VLANs

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
2019-12-04 13:48:37 +01:00
Kevin Darbyshire-Bryant
c58ae7d3f4 luci-mod-network: dnsmasq: correct sense & usage of dnsseccheckunsigned
dnsmasq v2.80 made 'dnssec-check-unsigned' the default, reflect this in
the gui.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2019-11-22 15:25:59 +00:00
Jo-Philipp Wich
0513edade8 luci-mod-network: dhcp.js: fix DNSSEC feature probing
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-08 10:33:44 +01:00
Jo-Philipp Wich
392ba53eff luci-base, luci-mod-network: migrate getDUIDHints method to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-08 10:25:30 +01:00
Jo-Philipp Wich
c00d860981 luci-mod-network: wireless.js: restore client disconnect functionality
Ref: https://forum.openwrt.org/t/19-07-luci-disconnect-missing/47897
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-07 12:18:35 +01:00
Jo-Philipp Wich
86f492173d treewide: require ui.js explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 21:55:50 +01:00
Jo-Philipp Wich
f16a47042c luci-base, luci-mod-network: invoke ifdown directly in interface overview
Replace the `iface_down` endpoint with a direct invocation of `/sbin/ifdown`
and replace the interface connectivity check with a call to the new
`remote_addr` endpoint.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 17:56:58 +01:00
Jo-Philipp Wich
b4861da886 luci-mod-network: fix disabled state in wifi settings modal
Also auto-enable the radio upon network join.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:32:17 +01:00
Jo-Philipp Wich
c72c78bed9 luci-mod-network: interfaces.js: issue iface restart via file/exec rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
6aa4b83f24 luci-mod-network: wireless.js: issue wifi restart via file/exec rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
650d7f64d5 luci-base: remove unused Lua code
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
37b6092aef luci-base, luci-mod-network, luci-app-firewall: migrate luci/getHostHints
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
5ff35d8be4 luci-base, luci-mod-network: migrate luci/getDHCPLeases to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
9d80dbe635 luci-mod-network: wireless.js: fix null access on failing iwinfo calls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-15 18:42:04 +02:00
Jo-Philipp Wich
f61d6ee148 luci-mod-network: wireless.js: fix null access on unavailable country list
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-15 10:03:48 +02:00
Jo-Philipp Wich
17800040f2 luci-mod-network: display the mesh ID in wireless overview if applicable
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-30 12:40:12 +02:00
Jo-Philipp Wich
66749b4fe3
Merge pull request #2756 from Ansuel/wps
luci-mod-network: permit WPS push-button on WPA3
2019-09-24 19:56:44 +02:00
Ansuel Smith
3571af9488
luci-mod-network: permit WPS push-button on WPA3
Currently WPS push-button is dropped when SAE or SAE-Mixed is selected. WPS is still supported in WPA3.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-09-24 19:39:12 +02:00
Ansuel Smith
d3541e9269
luci-mod-network: add master option
Adds option to set interface as master in dhcpv6 relay mode.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-09-24 19:10:11 +02:00
Jo-Philipp Wich
4a564736ea luci-mod-network: wireless.js: properly handle SAE in join confirmation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24 08:09:02 +02:00
Jo-Philipp Wich
e630b32498 luci-mod-network: interfaces.js: map remove action to network.deleteNetwork()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24 08:07:50 +02:00
Jo-Philipp Wich
4d3d23b5e9 luci-mod-network: wireless.js: prompt for passphrase when joining SAE net
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24 07:24:11 +02:00
Chen Minqiang
2f92a29628 luci-mod-network: resort zonePromise order
This fix #3103

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2019-09-24 07:08:49 +02:00
Jo-Philipp Wich
720df98642 luci-mod-network: sort wifi encryption by strength and popularity
Fixes: #3082
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 17:11:38 +02:00
Jo-Philipp Wich
f3a94051ec luci-mod-network: fix key option quirk when switching wep and wpa modes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 13:39:22 +02:00
Jo-Philipp Wich
ccd1523610 luci-mod-network: default to ieee80211w=2 for OWE
Ref: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/services/hostapd/files/hostapd.sh;h=46acbefeeeb771de879dd9926ad170042dff2473;hb=HEAD#l327
Fixes: 63f28fd06 luci-mod-network: default to ieee80211w=1 for OWE
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 11:30:09 +02:00
Jo-Philipp Wich
63f28fd065 luci-mod-network: default to ieee80211w=1 for OWE
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 09:55:51 +02:00
Jo-Philipp Wich
5986124c13 luci-mod-network: wireless.js: fix parsing of wep key slot cfgvalue
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 09:36:23 +02:00
Jo-Philipp Wich
0113171c64 luci-mod-network: wireless.js: fix disabled state on disabled radio
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-19 15:48:27 +02:00
Jo-Philipp Wich
0d9a77d806 luci-mod-network: wireless.js: select proper 11w default for WPA3 modes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-19 15:47:55 +02:00
Jo-Philipp Wich
15cc74c6b4 luci-mod-network: interfaces.js: derive status from layer 3 device
Align the status column device selection logic with the approach used for
rendering the interface status boxes; first try to obtain the active
layer3 device as reported by ubus, only then fall back to the protocol
specific device hint which might or might not point to an existing device.

Fixes: #3076
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-18 07:33:25 +02:00
Jo-Philipp Wich
88c16e17d9 luci-mod-network: wireless.js: restore mac hints in mac list widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-13 14:19:33 +02:00
Jo-Philipp Wich
82743b3bd4 luci-mod-network: reimplement switch configuration as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12 11:09:57 +02:00
Jo-Philipp Wich
5e7e9b58cf luci-base: restore some lost translations and update german
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11 14:03:11 +02:00
Jo-Philipp Wich
963b7636b4 luci-mod-network: switch to client side wifi configuration pages
Rewrite the wireless network management views in client side JS using ubus
rpc calls for the router communication.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
14b6ea6ea7 luci-mod-network: slightly improve static lease config
- Autoselect the matching IPv4 address when initially picking a MAC
 - Add hostname hints in the MAC/IP dropdowns

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
e4bc192012 luci-mod-network: switch to client side interface configuration pages
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10 15:28:16 +02:00
Jo-Philipp Wich
ed8f1c4c1c luci-app-firewall: honour global default policies in per-zone settings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Jo-Philipp Wich
140456f07a luci-mod-network: fix typo in wifi scan JS code
Fixes: 8dd2df29c ("luci-mod-network: improve wifi scan status reporting")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-21 09:42:48 +02:00
Jo-Philipp Wich
8dd2df29c4 luci-mod-network: improve wifi scan status reporting
Attempt to properly report the scan status by treating 404 replies as
not yet completed scans and empty array replies as successful scans
that did not yield any results.

Fixes: #2874
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-19 17:59:05 +02:00
Jo-Philipp Wich
875a96f653 luci-mod-network: switch hostname configuration to client side js
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 20:14:18 +02:00
Jo-Philipp Wich
d6aa68ae0d luci-mod-network: switch route configuration page to client side view
Also implement extended route attributes via modal dialog.

Fixes: #2695
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 19:12:59 +02:00
Jo-Philipp Wich
a96bec68a0 luci-mod-network: replace DHCP & DNS view with client side implementation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:25 +02:00
Florian Eckert
2b94060c60 luci-mod-network: add auto start hint
Make the information if the interface is started on boot visible on the
interface overview page.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-04-25 10:18:02 +02:00
Jo-Philipp Wich
7423bd9aa3 luci-mod-network: fix bad unicode comma in network.js
Fixes: 5624b36fa ("luci-mod-network: fix page refresh after interface reconnect")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-04-08 17:10:09 +02:00
Jo-Philipp Wich
5624b36fa7 luci-mod-network: fix page refresh after interface reconnect
Submitted-by: "taeasy" <88336@live.com>
[reword commit subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-04-08 08:21:30 +02:00
Jo-Philipp Wich
1828af9827
Merge pull request #2421 from SibrenVasse/ssid_format
SSID escaping
2019-01-30 08:23:53 +01:00
Sibren Vasse
970fa9a4e0
luci-mod-network: fix extraneous escaping
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2019-01-11 17:10:05 +01:00
Yousong Zhou
7908b2b71c treewide: fix query arguments to admin/system/opkg
Right now the handler only recognizes "query=xx" argument, others will
be ignored.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-01-01 05:04:51 +00:00
Yousong Zhou
85b67625f7 treewide: fix redirecting to System->Software
By replacing url "admin/system/packages" with "admin/system/opkg"

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-01-01 05:04:49 +00:00
Jo-Philipp Wich
548281773d luci-mod-network: remove debug code from iface_status.js
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-24 21:32:33 +01:00
Jo-Philipp Wich
4bd7f4ba42 luci-mod-network: move wifi and iface status JS into external files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-23 15:47:44 +01:00
Jo-Philipp Wich
f73dc51ea1 luci-mod-network: move wifi scan JS into external file
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-23 15:44:18 +01:00
Jo-Philipp Wich
a03ec60696 luci-mod-network: move wifi overview markup and JS code into external files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-22 12:58:34 +01:00