The WireGuard protocol handler passes the tunlink option to netifd as
the interface to create the host routes to the peer endpoints on
(proto_add_host_dependency). Without it, netifd uses the interface with
the most specific route to the endpoint, which is not always the
intended uplink, e.g. with several WAN interfaces or other VPNs.
LuCI has no field for it, so it can only be set with uci. Add it as
"Underlying interface", next to "No Host Routes".
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Erik Conijn <egc112@msn.com>
Follow the rework of the 'init_epsbearer' modes in the modemmanager
package:
- modem: Leave unchanged (stored on modem), the new default
- network: Network-assigned
- connection: Same as connection (was 'default')
- custom: Custom
The LuCI value 'none' was stored as an empty option, which since
modemmanager commit 246506690f2d clears the initial EPS bearer instead
of leaving it untouched as described. Store 'modem' explicitly instead.
The legacy values 'none' and 'default' are shown as 'modem' and
'connection'.
Link: https://github.com/openwrt/packages/issues/30299
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
I have not had touched this in years, and was
added as maintainer during treewide
PKG_MAINTAINER additions. I do not
have anything to test this against. Therefore,
removing myself as maintainer.
Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
The 'iptype' and 'init_iptype' ListValue options declared 'ipv4v6' as
the default in LuCI, while the modemmanager package itself defaults to
'ipv4' (see net/modemmanager README.md).
Since LuCI omits writing a UCI option when the selected value matches
the field's declared default, selecting 'IPv4/IPv6 (both)' in the UI
never actually saved 'option iptype ipv4v6' to /etc/config/network.
On the next apply, modemmanager fell back to its own default ('ipv4'),
silently downgrading the connection to IPv4-only and making the
'ipv4v6' option effectively unusable through LuCI.
Align both defaults with the modemmanager package default ('ipv4') and
drop the now-inaccurate '- defaults to IPv4' hint from the 'ipv4v6'
label. The dropdown entries are also reordered so the new default
('ipv4') is listed first, matching the convention used by other
ListValue fields in this file.
Reported-by: moawut <https://forum.openwrt.org/u/moawut>
Ref: https://forum.openwrt.org/t/luci-proto-modemmanager-support-thread/23696/120
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
OpenWrt gained a per-interface "sendclientid" option which overrides the
preferred DUID used for DHCPv6 requests. Expose it in the advanced
settings of the DHCPv6 client protocol:
- "auto" (default) uses the explicitly configured client ID, or falls
back to the global default DUID and finally a DUID-LL derived from the
interface MAC address
- "global" always uses the global default DUID
- "hardware" passes no client ID to odhcp6c, so a type 3 DUID-LL is used
Unlike DHCPv4 there is no "none" mode, as odhcp6c always sends a client
identifier. The explicit client ID is only evaluated in "auto" mode,
hence it now depends on that setting.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Maintainer: @systemcrash
CC: @feckert
Version: Main
Compile tested: X86-64
Run tested: X86-64
Description:
The push_opt tab incorrectly registered a server-side auth_user_pass
Value option.
So move it to the client-side FileUpload option on the general tab.
auth_user_pass is a client-only option; the corresponding server-side
directive is auth-user-pass-verify, which is already correctly
defined under the scripts tab as auth_user_pass_verify.
Also update the general-tab auth_user_pass label to a clearer description
of the expected file format (username and password on separate lines).
Signed-off-by: Erik Conijn <egc112@msn.com>
According to the documentation, values from '1' to '4294967295' are allowed
values for the 'ifid' option. The value ‘0’ is excluded, as '0' is treated
as the default ID or an unassigned ID.
While we’re at it, mark the option as non-optional.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Properly escape the slash '/' chars that are included in the regex
strings in javascript files. Slash is used as a regex delimiter in
javascript, so an un-escaped slash may cause parsing errors in some
tools like xgettext used with .po translation manipulation.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Fix a typo in the cryptography tab where 'TLS cert profile' was
accidentally written as 'TLS cet profile'.
Signed-off-by: David Han <h96643864@gmail.com>
This hasn't knowingly caused problems before now, an indicator
that it goes lesser or unused hitherto.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Add a 'realm' field in the advanced tab so users can easily pass this
parameter to the underlying netifd handler.
Signed-off-by: Xing-Kai Wang <my@xkwang.org>
A batman-adv VLAN interface has protocol 'batadv_vlan' and allows
configuration of option 'ap_isolation' for a batman-adv VLAN device.
This adds support for configuration of such an interface to LuCI.
Signed-off-by: Bastiaan Stougie <wififreedom2026@protonmail.com>
The ACL permissions were originally authored to support just a single
set of modem interfaces, at the numbers 0-9. Eventually this was
adjusted to support from 0 to 999 avoiding command injection.
However, as new commands were added, this was reverted again
unfortunately. Language like "regex" has been used in the commit history
for this ACL, and likely the core of the issue is confusion on how these
are parsed. These are all parsed [1] with fnmatch(...), and not regex(..).
A future useful change could be for rpcd to set the FNM_EXTMATCH option
for fnmatch(...) to simplify this particular match statement, but that's
not considered here since that's a much broader change that needs a
longer discussion.
[1] https://github.com/openwrt/rpcd/blob/a4a5a298588960638a2e1713eb8fb858e1dbedeb/session.c#L143-L147
Fixes: 54aa70112c ("luci-proto-modemmanager: add status page")
Signed-off-by: Tim Nordell <tnordell@airgain.com>
make push(_reset) independent of server
The manual notes that push is a legal option in a client
context, i.e. the client can set these also.
Add also push_remove.
fix also the datatype for 'remote' to allow various combos.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
OpenVPN does have many options. To make it manageable, these options
are created by using a generic template. The necessary information for
the template is defined for each OpenVpn option in a single line.
This is very confusing and has the following disadvantages.
* Difficult to read, as the lines are very long with line breaks.
* A change in the option causes the entire line to be marked as changed.
This complicates the review process, as it is not immediately apparent
what has been changed.
The current format offers no advantage during development, as the code
will be minimised later anyway.
Therefore, this commit reformats the OpenVPN template option to make
the individual elements of the template easier to recognise.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
prevent global variable bleed and reduce size somewhat
-cbi
-network
-protocol/static
-rpc
-tools/widgets
-tools/views
-uci
protocols
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Previously, the render code attempted to add the class "hidden" to the button
row, the button row which can have a persistent visibility style applied via CSS
so the "hidden" class attribute was overridden. Set the style.display of the row
instead which now hides the button row.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This adds the possibility to set our own L2TP hostname in the advanced
tab. It's needed if the peer only allows certain hostnames to connect.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
IPv6 prefix length is normally valid in the range 0–64.
Additionally, /128 is a special case that needs to be supported.
Signed-off-by: Arayuki Mago <ms@missing233.com>
follow-up to: aa955d6465
Minor refactor of ucode, and some GUI fixes to ensure certificates are
written properly.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>