Commit Graph

1557 Commits

Author SHA1 Message Date
J. Burfeind
39c3c7adf3
ath79-generic: (re)add support for UniFi AP PRO (#2416)
Ubiquiti UniFi AP PRO

Gone due to
commit 45c84a1 ("ar71xx: drop target")
2022-03-26 11:11:32 +01:00
J. Burfeind
087c15ae0c
ath79-generic: (re)add support for UniFi AC Mesh (#2428)
Gone due to
commit 45c84a117b ("ar71xx: drop target")
2022-03-26 10:52:35 +01:00
J. Burfeind
1bfad8ff02
ath79-generic: (re)add support for CPE510 v1.x (#2430)
Gone due to
commit 45c84a117b ("ar71xx: drop target")
2022-03-25 23:39:19 +01:00
J. Burfeind
fd8d5a3cdb
ath79-generic: (re)add support for CPE210 v2.x (#2429)
Gone due to
commit 45c84a117b ("ar71xx: drop target")
2022-03-25 18:21:24 +01:00
J. Burfeind
a5ada094bf
ath79-generic: (re)add support for CPE210 v1.x (#2410)
Gone due to
commit 45c84a117b ("ar71xx: drop target")
2022-03-24 19:21:45 +01:00
Matthias Schiffer
9c13c4755e
gluon.mk: print source file name in GluonSrcDiet (#2424)
luasrcdiet will not print the name of its input file when an error
occurs. To facilitate debugging, echo the name before calling it, so it
is visible with V=s or BUILD_LOG=1.
2022-03-24 06:48:10 +01:00
David Bauer
a3203b26c4
Merge pull request #2372 from freifunk-gluon/uci-regen
Regenerate network and system UCI configs on every reconfigure, switch to role-based interface configuration
2022-03-20 17:54:04 +01:00
Matthias Schiffer
073e559dc5
gluon-mesh-babel: do not allow disabling VXLAN (#2376)
With Babel, wired meshing cannot run on the same logical interface as
non-mesh traffic, so using VXLAN is mandatory.
2022-02-23 19:10:13 +01:00
David Bauer
428b8afb92
Merge pull request #2186 from freifunk-gluon/fastd-l2tp
fastd: add L2TP offload support
2022-02-23 19:03:19 +01:00
Matthias Schiffer
26b26395d1
Merge pull request #2399 from MyIgel/remove-xhtml
treewide: Replace xhtml content type with html, remove xhtml workaround, replace self closing tags
2022-02-22 21:46:29 +01:00
Matthias Schiffer
a671b5081c
gluon-core: preserve explicitly marked network and system sections
A section can be marked as preseved by setting the gluon_preserve option
to 1. In addition the following conditions must hold:

- The preserved section must not already exist after OpenWrt's and
  Gluons setup scripts run. Modifying existing sections is currently
  unsupported.
- Preserved sections must be named, so it can be detected whether a
  section conflicts with a preexisting one.
2022-02-22 18:52:15 +01:00
Matthias Schiffer
6dcee2e324
gluon-web-network: update wired mesh settings for new role-based configuration 2022-02-22 18:52:15 +01:00
Matthias Schiffer
316e96a467
gluon-core, gluon-setup-mode: reset ifname sysconfigs on each update, introduce single_ifname
Allow interface names to change on updates to handle hwconfig -> DSA and
similar migrations.

On devices with only a single interface, a sysconfig single_ifname is
created instead of wan_ifname or lan_ifname to allow separate
configuration in site.conf.
2022-02-22 18:52:15 +01:00
Matthias Schiffer
c779d12369
treewide: use interface roles as basis for network configuration
With the new role-based interface configuration, it would be better to
rename the wan/wan6 interfaces to uplink/uplink6, but that would cause
unnecessary churn for the firewall configuration, so it is left for a
later update.

As all interfaces with the 'uplink' role are in the br-wan bridge, it is
not possible to assign these to the 'mesh' role independently - instead,
br-wan is added as a mesh interface as soon as a single interface has
both the 'uplink' and 'mesh' roles. The UCI section for this
configuration is now called 'mesh_uplink' instead of 'mesh_wan'.

For all interfaces that have the 'mesh', but not the 'uplink' role a
second configuration 'mesh_other' is created. If there is more than one
such interface, all these interfaces are bridged as well (creating a
bridge 'br-mesh_other'). This replaces the 'mesh_lan' section with its
optional 'br-mesh_lan' bridge, but can also include interfaces that were
not considered "LAN" when interfaces roles are modified (via site.conf
or manually).
2022-02-22 18:52:15 +01:00
Matthias Schiffer
4b8251c988
gluon-core: initialize interfaces role configuration
The new configuration generates sections iface_single/lan/wan in
/etc/config/gluon. These sections usually refer to a sysconfig-controlled
interface list, but adding custom sections with verbatim interfaces names
is also possible.

Each interface section contains a list of roles. The supported roles are
'client', 'uplink' and 'mesh'. Multiple roles can be configured on the
same interface (for example the old 'mesh_on_wan' setting would become
'uplink'+'mesh').

'client' is subsumed by any other role configured on the same interface
('client'+'mesh' is equivalent to 'mesh'). This property is important, as
it allows the Wired Mesh settings in gluon-web-network to simply add and
remove the mesh role without having to care what other roles are set -
so in the default setup, this would switch between 'client' and
'client'+'mesh' for the LAN interface.

By default, the WAN interface has role 'uplink' and the LAN interface
'client'; if only a single interface exists, the roles from the WAN
interface are used by default. The default for each of the three
interfaces (WAN/LAN/single) can be changed separated in site.conf,
superseding the old mesh_on_wan, mesh_on_lan and single_as_lan settings.
2022-02-22 18:52:15 +01:00
Matthias Schiffer
05c29512ec
gluon-core: sysconfig: avoid unnecessary writes
Do not write files when the content is unchanged.

Avoids a few unnecessary filesystem writes when resetting ifname
sysconfigs on each upgrade.
2022-02-22 18:52:15 +01:00
Matthias Schiffer
c2a5f57c40
treewide: regenerate network and system configs on every reconfigure 2022-02-22 18:52:15 +01:00
Matthias Schiffer
eea49a2834
gluon-config-mode-core: discard gluon-reconfigure output (#2395)
The stdout output of gluon-web scripts is directly sent to uhttpd,
becoming a part of the HTML output or even replacing HTTP status or
headers. The output of gluon-reconfigure is not supposed to end up
there.

While we're at it, also add an exec to avoid an unnecessary shell
process.
2022-02-22 18:51:45 +01:00
Igor Scheller
f033fcfc0d treewide: Replace /> self closing html tags with > 2022-02-22 18:48:09 +01:00
Igor Scheller
d728f17b8f treewide: Replace xhtml content type with html, remove xhtml workaround 2022-02-20 12:45:43 +01:00
Igor Scheller
bbc00017a9
gluon-web-osm: Fix " rendering in attribution with CDATA tag (#2398) 2022-02-20 11:51:58 +01:00
Matthias Schiffer
62b24ed7ce
gluon-web-osm: update OpenLayers default URL to 5.3.0
The OpenLayers JS/CSS download URL is dead. Update it to make the map
work again:

- Update from OpenLayers 5.2.0 to 5.3.0
- Switch from the obsolete rawgit.com URL to jsdelivr.net (rawgit.com
  was only redirecting to jsdelivr.net for the last few years anyways)
- Set a fixed commit in the URL, so the URL doesn't become outdated again
2022-02-13 22:07:36 +01:00
Matthias Schiffer
7c6befc7c3
gluon-mesh-vpn-fastd: add L2TP offload support 2022-02-08 21:09:15 +01:00
Matthias Schiffer
15eeb86f42
gluon-{,web-}mesh-vpn-fastd: add support for null@l2tp method
THe "null" and "null@l2tp" methods are considered equivalent and always
added and removed together when the method list is "configurable".
"null@l2tp" is added before "null", so it is preferred when the peer
supports both.
2022-02-08 21:01:42 +01:00
Matthias Schiffer
487d312d25
fastd: update and add L2TP variant
This also drops the GMAC-based methods from gluon-mesh-vpn-fastd's
check_site.lua, as they are not supported anymore.
2022-02-08 21:01:42 +01:00
Matthias Schiffer
68e8d32570
Merge pull request #2383 from freifunk-gluon/web-fixes
gluon-web: prohibit cross-origin POST requests
2022-02-03 16:49:22 +01:00
Matthias Schiffer
1041014cf3
Merge pull request #2382 from freifunk-gluon/cleanup
Removal of more obsolete migrations, minor cleanup and improvements to lsupgrade.sh
2022-02-01 23:31:41 +01:00
Matthias Schiffer
a83466be6e gluon-web: prohibit cross-origin POST
As gluon-web uses standard multipart/form-data requests, browsers don't
enforce any cross-origin restrictions. To prevent malicious injection of
POST requests into the config mode, match the Origin header against the
Host header of the request.
2022-02-01 23:27:38 +01:00
Matthias Schiffer
f3960eeb47 gluon-web: improve error handling of parse_message_body()
Actually raise an error and turn it into an HTTP 400 return code when
something goes wrong, rather than ignoring the error.

We also improve the conditions under which errors are thrown before
pump() is called: We don't need to check for the multipart/form-data
content-type twice, and a POST without this content-type is now always
an error.
2022-02-01 23:27:38 +01:00
Matthias Schiffer
de43b306d4 gluon-web: add CRLF to text/plain Internal Server Error output
Having a trailing newline is nice when viewing the returned data in a
terminal.
2022-02-01 23:27:38 +01:00
Matthias Schiffer
94519cfc56
gluon-web-*: remove unused "token" form value
This was a remnant of LuCI that was never used in gluon-web.
2022-02-01 23:22:08 +01:00
Matthias Schiffer
3ea770db73
ath79-generic: swap interfaces on TP-Link WBS210 v2 (#2385)
Swap the interfaces so than the PoE input port LAN0 is used for WAN and
config mode, and LAN1 becomes LAN.

To this end, the code previously used for ar71xx and removed in
commit 9fdc57c175 ("treewide: drop ar71xx platform specific code") is
reintroduced.

Fixes #2384
2022-01-28 19:45:34 +01:00
Matthias Schiffer
578daf5f87
gluon-core: remove obsolete config file 2022-01-23 14:44:07 +01:00
Matthias Schiffer
12127813c5
gluon-core: move preserve_channels setting to /etc/config/gluon
/etc/config/gluon-core is used for nothing else.

As /etc/config/gluon uses a named wireless section, also change the
get_first() to get().
2022-01-23 14:44:06 +01:00
Matthias Schiffer
b68a07e930
gluon-mesh-vpn-fastd: merge secret generation setup into main upgrade script
There wasn't really a reason to have a separate script to set a single
value.

In addition, the old script was using the identifier 'c' instead of
'uci' for the UCI cursor. Following the convention of the other scripts
is helpful so it is easy to grep for all uses of a certain config file/
option.
2022-01-23 14:44:06 +01:00
Matthias Schiffer
d8f6ed2406
gluon-node-info: remove obsolete migration/fixup 2022-01-23 14:44:06 +01:00
Matthias Schiffer
225e8692bd
gluon-radvd: remove obsolete migration 2022-01-23 14:44:06 +01:00
Matthias Schiffer
c530070e96
gluon-mesh-vpn-tunneldigger: remove obsolete migration 2022-01-23 14:44:06 +01:00
Matthias Schiffer
84f4c164f4
gluon-setup-mode: remove obsolete migration 2022-01-23 14:44:06 +01:00
Luflosi
55e95dd49b
ath79-generic: add support for TP-Link Archer A7 v5 (#2374) 2022-01-14 23:20:22 +01:00
Maciej Krüger
a8d6a99f5b
gluon-mesh-vpn-wireguard: fix empty string key
Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 04:53:28 +01:00
Maciej Krüger
78ca654c5c
gluon-mesh-vpn-fastd: fix empty string key
Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 04:53:28 +01:00
Maciej Krüger
08a8ef0bcd
gluon-web-admin: remove pubkey empty string workarround
Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 04:53:25 +01:00
Maciej Krüger
816d2796be
gluon-core: add gluon info binary
This copies the code from web-admin and uses it to create a neat
cli-accessible summary about a node

This could also be extended or possibly have all the data the status
page has

Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 04:53:19 +01:00
J. Burfeind
7427ba2280
gluon-status-page: split bwlimit into two lines (#2371)
Fixes: 1cb0fc84fc ("gluon-status-page: swap bandwidth limits (#2304)")
Resolves #2370
2022-01-07 21:35:15 +01:00
David Bauer
b95b857aa8
Merge pull request #2339 from freifunk-gluon/status-page-iwinfo
gluon-status-page: use UCI + iwinfo to get channel information
2022-01-02 19:18:53 +01:00
Matthias Schiffer
eaac48e20d
gluon-mesh-vpn-fastd: remove obsolete migration 2022-01-01 01:46:19 +01:00
Matthias Schiffer
97ef7889c6
gluon-core: remove more obsolete migrations 2022-01-01 01:45:52 +01:00
Matthias Schiffer
9712912904
gluon-l3roamd: remove obsolete migration code 2021-12-31 23:22:14 +01:00
Matthias Schiffer
5b40265ff2
gluon-mesh-batman-adv: remove obsolete migration code 2021-12-31 23:16:15 +01:00