summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network
AgeCommit message (Collapse)Author
2021-06-01luci-mod-network: drop duplicated "Master" optionHannu Nyman
It got accidentally added when additional RA and NDP parameters were added. Fixes: 504bdb23fb ("luci-mod-network: Introduce new RA and NDP params...") Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-05-31luci-mod-network: migrate macaddr during bridge migrationRafał Miłecki
Link: https://forum.openwrt.org/t/network-migration-21-02-0-rc2/97934 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-31luci-mod-network: allow netifd version query to failJo-Philipp Wich
Fixes: 17af33ee48 ("luci-mod-network: migrate network config depending on netifd version") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-31luci-mod-network: make device selector dependent on protocol (again)Jo-Philipp Wich
This commit effectively reverts the change made with 907b4222f7 ("luci-mod-network: don't hide "Device" on protocol change"). Floating tunnel protocols such as 6in4, plain PPP over modem device, VPNC etc. do not have any layer 2 device at all, for such protocols the device selector should be hidden. Also swap back the incorrect option order introduced with commit b7f3cf66ca ("luci-mod-network: drop support for *adding* legacy bridges"). Since device depends on proto, it should come after the protocol selection, not before. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-31luci-mod-network: fix device dependencies in add interface dialogJo-Philipp Wich
Commit b7f3cf66ca "luci-mod-network: drop support for *adding* legacy bridges" dropped the protocol dependcies of the ifname/device selector in the add new interface dialog. Re-add the required dependencies and swap the order of the protocol and device inputs while we're at it since latter depends on the former. Fixes: b7f3cf66ca ("luci-mod-network: drop support for *adding* legacy bridges") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-29luci-mod-network: split config migration into 2 stepsRafał Miłecki
Problem with handling all migrations in 1 step is that uci.sections() doesn't include changes queued using uci.callAdd() and uci.callSet(). That could result in unexpected behaviour and generating invalid configs. For the sake of simplicity and reliability use 2 steps migration. The downside is that users may get prompted twice to migrate. Reported-by: Hauke Mehrtens <hauke@hauke-m.de> Fixes: 74be304e541f ("treewide: use "device" option in UCI "interface" sections") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-28luci-mod-network: allow setting bridge device MTU and MACRafał Miłecki
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-27luci-mod-network: bump min netifd version for migrationRafał Miłecki
Using "device" option requires netifd from 2021-05-26 or newer. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-27treewide: use "device" option in UCI "interface" sectionsRafał Miłecki
netifd has been recently patched to use "device" option instead of "ifname" as more clear & accurate. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-26luci-mod-network: migrate network config depending on netifd versionRafał Miłecki
Checking netifd version is important for users of the most recent LuCI that didn't update netifd (e.g. OpenWrt package). Suggested-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-26luci-mod-network: migrate config to use "ports" optionRafał Miłecki
LuCI supports only the newer method of specifying bridge ports using the "ports" option. Offer users migration so they can configure their network. Example: 1. Before config device option name 'br-lan' option type 'bridge' list ifname 'lan1' list ifname 'lan2' list ifname 'lan3' list ifname 'lan4' 2. After config device option name 'br-lan' option type 'bridge' list ports 'lan1' list ports 'lan2' list ports 'lan3' list ports 'lan4' Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-20luci-mod-network: drop 2 unused variablesRafał Miłecki
Fixes: faad7464a8ed ("luci-mod-network: add support for network.device sections") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-20luci-mod-network: don't hide "Device" on protocol changeRafał Miłecki
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: ec020cee0c44 ("luci-mod-network: drop support for *editing* legacy bridges") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-18luci-mod-network: add bridge interface migrationRafał Miłecki
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-18luci-mod-network: use "ports" option for setting bridge portsRafał Miłecki
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-18luci-mod-network: drop support for *editing* legacy bridgesRafał Miłecki
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-18luci-mod-network: drop support for *adding* legacy bridgesRafał Miłecki
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-04-20luci-mod-network: fix handling of optional RA/NDP optionsHannu Nyman
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-14luci-mod-network: fix xhtml markupDirk Brenken
* fix markup in interfaces.js (#4980) * sync translations Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-04-01luci-mod-network: Introduce new RA and NDP params with help-text.Paul Dee
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-01luci-mod-network: Add help text for many existing odhcpd IPv6 parametersPaul Dee
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-03-29luci-mod-network: fix device section cleanupJo-Philipp Wich
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-29luci-mod-network: allow disabling interface->device option migrationJo-Philipp Wich
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-29luci-mod-network: fix changing ifname in disabled legacy bridge modeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29luci-mod-network: make condition for disabling legacy bridging more specificJo-Philipp Wich
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-29luci-mod-network: fix unsetting network.device optionsJo-Philipp Wich
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-29luci-mod-network: don't implicitly move bridge opts into device sectionsJo-Philipp Wich
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-21luci-mod-network: fix handling of peerdns/dns/dns_search optionsJo-Philipp Wich
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-21luci-mod-network: restore DNS option semantics for proto staticJo-Philipp Wich
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-21luci-mod-network: fix legacy bridge configurationJo-Philipp Wich
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-21luci-mod-network: fix invalid variable access when creating interfacesJo-Philipp Wich
Fixes: eeef38d534 ("luci-mod-network: add support for bridge vlan filtering") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-18luci-mod-network: fix opacity for device icon tooltipsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-18luci-mod-network: tools.network: handle bridge config and vlan corner casesJo-Philipp Wich
- 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-18luci-mod-network: allow wifi bridging with bridge or bridge vlan ifacesJo-Philipp Wich
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-18Merge pull request #4307 from jow-/uci-network-device-supportJo-Philipp Wich
Introduce support for managing `config device` and `config bridge-vlan` sections
2021-03-17Merge pull request #4709 from ↵Florian Eckert
opastushkov/dnsmasq_crash_on_duplication_of_static_ip luci-mod-network: issue with breakdown of dnsmasq after duplication o…
2021-03-15luci-mod-network: add support for bridge vlan filteringJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15luci-mod-network: add support for network.device sectionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15luci-mod-network: interfaces.js: simplify some code using new ui helpersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-01-20treewide: removed trailing whitespaces and extra newlines in 'modules'Giovanni Giacobbi
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
2021-01-04luci-mod-network: issue with breakdown of dnsmasq after duplication of ↵Oleksandr Pastushkov
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-02luci-mod-network: modernize 802.11w help textHannu Nyman
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-02luci-mod-network: skip check for 802.11w featureDobroslaw Kijowski
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>
2020-12-23luci-mod-network: restrict legacy_rates option to hwmode 11gJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-12-21Merge pull request #4649 from nicklowe/masterFlorian Eckert
luci-mod-network Add description: Hidden SSID, WMM
2020-12-12luci-mod-network: properly handle wireless devices when adding interfacesJo-Philipp Wich
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-09luci-mod-network Add description: Hidden SSID, WMMNick Lowe
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-06luci-mod-network: wireless.js Disable 802.11b by defaultNick Lowe
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-01luci-mod-network: wireless.js cell_density supportNick Lowe
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-11-27treewide: transition div tables to actual table markupJo-Philipp Wich
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>