Commit Graph

1429 Commits

Author SHA1 Message Date
Matthias Schiffer
42335a07c9
gluon-config-mode-core: unconditionally run gluon-reconfigure
Simplify the individual form providers by always running reconfigure. This
also commits all UCI packages, so we can remove all tracking of UCI
sections from the wizard code.

Instead of returning a list of packages to commit, the providers just
save their settings directly. Explicit runs of upgrade scripts are
removed, as they are now run by reconfigure.
2021-05-15 00:03:02 +02:00
Matthias Schiffer
16fab561db
gluon-config-mode-mesh-vpn: override Section:write() instead of Section:handle() 2021-05-15 00:03:02 +02:00
Matthias Schiffer
df9fa32d58
gluon-web-model: add state tracking to sections
This add support for a write() method on sections, in addition to the
value and form level write(). write() is only called when the section is
valid and visible. In addition, write() is empty by default, so it can be
overridden more easily.
2021-05-15 00:02:44 +02:00
Martin Weinelt
0ac3061225
Merge pull request #2214 from AiyionPrime/status_page_mesh_protocol 2021-05-09 16:53:49 +02:00
aiyion.prime
5c12b037d7 libgluonutil: free getline
Co-Authored-By: lemoer <git@irrelefant.net>
2021-05-08 20:35:24 +02:00
David Bauer
1c38906eef
Merge pull request #2163 from lemoer/pr_vpn_as_gluon_wired
Generalize proto "gluon_wired.sh"
2021-05-07 00:10:27 +02:00
aiyion.prime
a683486514 fixup! gluon-status-page: add mesh protocol to status-page 2021-05-06 19:03:06 +02:00
aiyion.prime
77a6b9a947 gluon-status-page: add mesh protocol to status-page 2021-05-06 16:37:32 +02:00
lemoer
bbecd44be1 gluon-core: extend gluon_wired proto for l3 devices
This is a preparation to use the gluon_wired.sh proto on top of
layer 3 tunnel interfaces.
2021-05-06 00:43:01 +02:00
lemoer
c14b4c0b4b gluon-core: add vxlan option to gluon_wired proto
Before this commit the decision whether a vxlan layer will be
introduced between the lower interface before the interface is
added to batman was inside the proto. Now the decision is moved
to the user of the proto.
2021-05-06 00:43:01 +02:00
David Bauer
9e09d08cf6
Merge pull request #2177 from blocktrron/pr-wan-radio-ifname
gluon-web-private-wifi: define ifname for WAN radio
2021-05-03 17:39:31 +02:00
David Bauer
e729b81312 gluon-private-wifi: add package
Add a package for handling upgrade-scripts speific for the WAN radio
operation.

This way, the config mode interface can be removed seperately from the
core functionality to perform tasks on system upgrade. This can be
useful when the setup-mode is removed entirely for space preservation.
2021-05-02 23:25:32 +02:00
David Bauer
a922944fee mesh-wireless-sae: drop unused function parameters
Drop these unused parameters in the function description, as only the
first parameter is referenced within the function block.
2021-05-02 02:20:00 +02:00
David Bauer
f4adb66772 gluon-web-private-wifi: define ifname for WAN radio
Set the ifname for the WAN radio (Private WLAN) to wanX, X being the
radio index.

All other radios created by Gluon already have their ifname defined
following this pattern.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-01 20:57:15 +02:00
David Bauer
d0551c2dcd web-admin: fix firmware partition name
The rudimentary flash size determination function expects the partition
for the devices firmware to be called "linux" while it is (since quite
some time) "firmware".

Fix this error to display available flash size as well as more useful
error message in case the uploaded firmware image exceeds the flash
space.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-01 03:15:51 +02:00
Linus Lüssing
288daf5a47 gluon-mesh-batman-adv: reenable batman-adv multicast optimizations
With batman-adv 2020.4 and the according backports to batman-adv v2019.2
several more bugs were found and fixed regarding the batman-adv
multicast optimizations feature.

Also a "wakeup-call" feature was added to the Linux bridge IGMP/MLD
snooping code in Gluon to work around issues with Android devices.

With batman-adv now at v2019.2, multicast-to-multi-unicasts conversion
is supported, too. Which means that even if there are a few outdated nodes
these and all other recipients will be served multicast packets via unicast,
too, as long as the sum of receiving nodes does not exceed the multicast
fanout setting (default: 16). If is exceeded, then batman-adv will revert
back to broadcast flooding automatically.

Long story short, with all these extra measures in place, let's reenable
the batman-adv multicast optimizations to reduce the layer 2 overhead
and in preparation for multicast applications in the future.

The default is enabled for this feature anyway, so removing the
"batctl multicast_mode 0" overwrite is sufficient.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2021-04-29 00:40:39 +02:00
Jan-Tarek Butt
9826a12b38 ath79-generic: add Archer D50 v1
Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-28 00:30:25 +02:00
David Bauer
490c522351
Merge pull request #2200 from AiyionPrime/status_page_role
gluon-status-page: add role to status-page
2021-04-28 00:11:26 +02:00
aiyion.prime
e6bdbe811a gluon-status-page: use sitetranslation for role 2021-04-23 15:57:37 +02:00
aiyion.prime
f14707cfa2 gluon-status-page: use mac80211 identifier (phy) 2021-04-22 22:43:48 +02:00
aiyion.prime
dc400c9220 gluon-status-page: reformat spaces 2021-04-22 21:43:55 +02:00
aiyion.prime
344d3ab686 gluon-status-page: add channels to status-page 2021-04-22 21:43:55 +02:00
aiyion.prime
b6ec181c80 gluon-status-page: add role to status-page 2021-04-12 12:08:04 +02:00
aiyion.prime
5e2525f573 statuspage: fix tq width
overflow for 'DejaVu Sans'.
2021-04-07 13:02:33 +02:00
J. Burfeind
2c0f8292c6
gluon-neighbour-info: end before timeout (#2185)
End the process after one result in case -l is not given
and destination address is unicast.
Reduces singleshot execution time from timeout seconds to around 150ms.

resolves #2184
2021-03-15 17:52:34 +01:00
Matthias Schiffer
2ecbe488bc
gluon-core: remove unneeded KERNEL_L2TP_IP config symbol
No package uses l2tp_ip.
2021-03-07 18:48:06 +01:00
Sven Eckelmann
50537e5474 ipq40xx: add support for Plasma Cloud PA2200
This device is a dual 5GHz device. It is recommended to manually change the
radio of the first device to the lower 5GHz channels and the second radio
to the upper 5GHz channels
2021-01-13 08:28:12 +01:00
Sven Eckelmann
17baf0f415 ipq40xx: add support for Plasma Cloud PA1200 2021-01-13 08:28:12 +01:00
David Bauer
db9768310a
Merge pull request #2153 from FreifunkVogtland/pa300
ath79: Add support for Plasma Cloud PA300(E)
2021-01-12 15:22:03 +01:00
Matthias Schiffer
17123aa420
gluon-respondd: fix count_stations() arguments
Fixes warnings about implicit pointer-to-int and int-to-pointer casts.

Fixes: 59a4cd63b8 ("gluon-respondd: expose OWE clients in nodeinfo")
2021-01-12 04:32:23 +01:00
Matthias Schiffer
52ee93f160
libgluonutil: add missing gluonutil_get_primary_domain() prototype
Fixes respondd on 64bit archs, as gluonutil_get_primary_domain() was
assumed to return int without the prototype.

Fixes: bcf57467dd ("libgluonutil: implement gluonutil_get_primary_domain()")
2021-01-12 04:29:08 +01:00
Sven Eckelmann
6e2faecb4e ath79: add support for Plasma Cloud PA300E 2021-01-10 09:06:02 +01:00
Sven Eckelmann
a9039229d6 ath79: add support for Plasma Cloud PA300 2021-01-10 09:05:58 +01:00
David Bauer
fd3ecea953
gluon-core: use OpenWrt label-mac as fallback (#2170)
This adds the OpenWrt label-mac device selection as the most preferred
fallback.

While this is only used on OpenWrt 19.07 for backports, we can also use
the label-mac device when backporting device support. This way, we have
to deal with less device-sepcific code downstream.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-01-10 00:51:15 +01:00
CodeFetch
50313697c7 packages: introduce syslog function in gluon.util
This commit introduces a simple function for writing to the syslog and
replaces the custom function used by gluon-hoodselector.
2020-12-29 01:33:29 +01:00
David Bauer
430c0ecc60 wireless-encryption mesh-wireless-sae: depend on OpenSSL daemons
This switches the used wireless daemons for OWE / SAE to the OpenSSL
flavors. The WolfSSL implementation currently seems to be broken.

THis switch may be reverted at a later point in time when hostapd /
wpa_supplicant implementations for WolfSSL have matured.
2020-12-16 00:52:27 +01:00
Martin Weinelt
277718887d
ath79-generic: add support TP-Link Archer C2 v3 (#2145)
CPU: 750 MHz QCA9563
Flash: 8 MB
RAM: 64 MB
Radio 1: Qualcomm Atheros QCA9563 (b/g/n)
Radio 2: Qualcomm Atheros QCA9887 (a/n/ac)
2020-11-11 22:44:11 +01:00
Steffen Förster
954f31a761 ramips-mt7620: add support for Netgear EX3700/EX3800
Specifications:
* SoC: MT7620A
* RAM: 64 MB DDR
* Flash: 8MB NOR SPI flash
* WiFi: MT7612E (5Ghz) and builtin MT7620A (2.4GHz)
* LAN: 1x100M

The -factory images can be flashed from the device's web
interface or via nmrpflash.

Both devices differ by a additional power outlet for the EX3800.
This patch has been tested on a EX3800 device.
2020-10-06 00:04:22 +02:00
Andreas Ziegler
ab2f82ca73
clean up old cleanup code lines (#2119)
* gluon-core: remove obsolete file 100-core-reset-sysctl

* gluon-core: remove obsolete cleanup line

* gluon-client-bridge: remove obsolete cleanup line
2020-09-17 18:19:59 +02:00
David Bauer
5b068d7c47
treewide: rename local_client zone (#2115)
This renames the local_client zone to loc_client, as local_clint exceeds
the maximum zone length allowed for firewall3, which is 11 bytes.

This worked previously due to firewall3 using unsafe string operations.
Now creation of the chain fails (latest OpenWrt master).
2020-09-13 05:24:33 +02:00
Andreas Ziegler
37a40cbca2
Merge pull request #2111 from freifunk-gluon/features-fix
Fix two feature handling bugs
2020-08-30 17:20:51 +02:00
T-X
d73c6b2bcf
gluon-ebtables-filter-multicast: allow respondd queries (#2103)
This allows running a respondd querier and map server behind a Gluon
node.

For instance at Freifunk Lübeck we now moved the map server
behind a Gluon VM and removed batman-adv and fastd from the
map server VM to reduce the maintenance work.

Increased multicast overhead should be minimal / non existent, as it is
unlikely to accidentally have respondd queriers running behind a Gluon
node.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2020-08-29 09:52:55 +02:00
Matthias Schiffer
13b743d51e features: fix handling of logical expressions
The rewrite of the feature handling introduced multiple major bugs. One
of them was caused by the way Lua's logical operators work:

An expression of the form

    _'autoupdater' and _'web-advanced'

would return 'web-advanced' rather than the boolean true when _ returned
both strings unchanged (because the features are enabled).

As entries with more than a single feature name in their expressions did
not set no_default, Gluon would then attempt to add gluon-web-advanced to
the package selection, as web-advanced is a "pure" feature.

To fix this, and get rid of the annoying nodefault, separate handling of
"pure" feature and handling of logical expressions into two separate
functions, called feature() and when(). To simplify the feature
definitions, the package list is now passed directly to these functions
rather than in a table with a single field 'packages'.

Fixes: ee5ec5afe5 ("build: rewrite features.sh in Lua")
2020-08-28 22:27:38 +02:00
Martin Weinelt
b1294472c6
Merge pull request #2065 from freifunk-gluon/early-reconfigure
Domain switch during reboot/gluon-reload
2020-08-22 19:50:55 +02:00
Jan-Tarek Butt
94f5bd23b9 gluon-core: 200-wireless simplify if conditions
Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
2020-08-19 17:16:22 +02:00
Martin Weinelt
78f4d0a348
Merge pull request #2099 from mweinelt/sae-wolfssl
gluon-mesh-wireless-sae: switch to wpa-supplicant-mesh-wolfssl
2020-08-16 01:50:58 +02:00
Martin Weinelt
e9e22f60e7
Merge pull request #2042 from blocktrron/wpa3-wolfssl
gluon-wireless-encryption-wpa3: switch to hostapd-wolfssl
2020-08-16 01:50:44 +02:00
Martin Weinelt
882595cc21
gluon-mesh-wireless-sae: switch to wpa-supplicant-mesh-wolfssl 2020-08-16 01:14:22 +02:00
Matthias Schiffer
d82ffb4f81
gluon-autoupdater: make site.conf branch setting optional
Default to the alphabetically smallest branch if none is set in
site.conf.

Also prevent enabling the autoupdater when no branches exist.
2020-08-15 16:36:27 +02:00
Matthias Schiffer
ee53357580
gluon-autoupdater: split CONFIG_GLUON_BRANCH into two separate options
The new options are CONFIG_GLUON_AUTOUPDATER_BRANCH and
CONFIG_GLUON_AUTOUPDATER_ENABLED and allow to control the default branch
and default enable status separately.

The `or ''` fallback in targets/generic is removed, as GLUON_ENV will
set all variables in GLUON_VARS, making previously non-existing
variables exist with an empty value.
2020-08-15 16:36:27 +02:00