Commit Graph

1477 Commits

Author SHA1 Message Date
aiyion.prime
9c197daf78 gluon-mesh-babel: implement neighbour check 2021-08-13 09:00:50 +02:00
J. Burfeind
6e09539539
gluon-mesh-batman-adv: implement neighbour and default_gw4 check (#2274) 2021-08-12 21:02:58 +02:00
micw
a1b961994a
Add support for tp-link CPE510 V2 (#2287)
Co-authored-by: Michael Wyraz <michael.wyraz@evermind.de>
2021-08-12 17:14:38 +02:00
micw
6b699f376c
Add support for tp-link CPE510 V3 (#2283) 2021-08-11 19:15:37 +02:00
David Bauer
14b1224f97
ipq40xx: add support for Aruba AP-365 / InstantOn AP17 (#2290) 2021-08-11 01:14:30 +02:00
J. Burfeind
38d6f75dd3
gluon-state-check: implement state checker (#2245) 2021-08-10 16:22:34 +02:00
Matthias Schiffer
f4a3afe8fb
treewide: correctly specify conffiles (#2276)
Specify conffiles for our packages, so they aren't overwritten during
opkg updates. While this only matters during development, it is
unintended to have different behaviour for opkg update and full firmware
updates.
2021-07-23 19:48:58 +02:00
lemoer
3a885a1b22
gluon-status-page: make "gateway nexthop" a link (#2278)
With this commit, the gateway nexthop is now a clickable link, that leads
to the status page of the nexthop.
2021-07-23 19:10:27 +02:00
Matthias Schiffer
bfec08546b
gluon-core: use uci:delete_all() instead of foreach()+delete() (#2273) 2021-07-17 23:24:01 +02:00
David Bauer
f01c62e594
gluon-core: wireless: support PHY lookup for multi-PHY devices (#2267)
The PHY lookup helper "find_phy_by_path" could not lookup the PHY name
for paths from multi-phy devices.

An example for such a path would be:
'1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0+1'

The integer after the plus (+) character determines the PHY index of the
specific device in relation to the PHY with the lowest index of the
device.

For example, if the device provides phy2 and phy3, the above path would
describe phy3. In case the device provides phy0 and phy1, it would
describe phy1.

Rewrite the "find_phy_by_path" function to support those paths as well
as regular device paths in a universal manner.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-17 22:50:02 +02:00
aiyion.prime
c2e27196de
gluon-web-admin: use util.popen3 in remote.lua
[Matthias Schiffer: whitespace changes, error handling]
2021-07-15 17:55:08 +02:00
aiyion.prime
e410a9c2e5 gluon-core: implement popen3() in gluon/util.lua
[Matthias Schiffer: simplify close_fds() helper and use in child process]
2021-07-15 17:53:07 +02:00
Matthias Schiffer
14236ed8f6
Merge pull request #2237 from freifunk-gluon/installed-check-site
Run site check for manual package installations
2021-07-14 16:20:20 +02:00
Matthias Schiffer
76a242b595
Merge pull request #2271 from freifunk-gluon/tiny-flash-cleanup
Remove ramips-rt305x and now unused build features
2021-07-14 16:20:01 +02:00
David Bauer
5ec8676b28
gluon-core: delete all network device sections (#2263)
Delete all default network device sections upon first boot.

Only LAN & WAN networks are defined at this point. We are using the
legacy way of definiting bridges via the interface sections ifname
option.

The prior filtering was based upon a single device and didn't take into
consideration that DSA interface names can be named arbitrarily.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-14 01:49:33 +02:00
Matthias Schiffer
c23bc293ef treewide: remove GLUON_SPECIALIZE_KERNEL
With the removal of ramips-rt305x, the last user of
GLUON_SPECIALIZE_KERNEL is gone.
2021-07-13 21:37:39 +02:00
Matthias Schiffer
09c9b78e30 ramips-rt305x: drop target
VoCores aren't exactly useful mesh nodes except for experimentation.
They certainly aren't worth maintaining a whole target, in particular
one that has a WLAN driver not used by any other target.
2021-07-13 21:37:39 +02:00
Martin Weinelt
76185e3a2a
gluon-status-page: relax nodeinfo query timeout (#2262)
It was found that a one second timeout for nodeinfo data may be too low,
so that when a node is otherwise occupied that timeout may be reached
too often.

The nodeinfo query response is also vital to the status-page base
template, so that when it times out, the site will be turned in a broken
state, that it cannot recover from.

Fixes: #2256
2021-07-12 19:23:29 +02:00
Matthias Schiffer
3a2d176df8
build: run site checks for manual package installations 2021-07-12 17:07:40 +02:00
Matthias Schiffer
298723c22b
gluon-core: gluon-check-site: do not fail when IPKG_INSTROOT is unset 2021-07-12 17:06:49 +02:00
Matthias Schiffer
eb3fad4bae
build: move check_site.lua main script into gluon-core package
Installing the script into the image allows site checks to run for
manual package installations via opkg.
2021-07-12 17:06:35 +02:00
Matthias Schiffer
3386221ef1
gluon.mk: fix indentation
A leading tab character usually marks recipe lines in Makefiles;
non-recipe lines must be indented using spaces.

The incorrect tab character doesn't seen to have caused any issues in
this case, but it should be fixed nonetheless, if only for consistency.
2021-07-11 22:39:48 +02:00
Martin Weinelt
97f6710d45
Merge pull request #2259 from blocktrron/bugfix-util-file-contains-line-exists
gluon-core: util: check if file exists prior to reading
2021-07-01 03:42:36 +02:00
David Bauer
ff9f295f7d gluon-core: util: check if file exists prior to reading
The file_contains_line helper function was not testing whether a file
exists or not prior attempting to read from it.

Add this check to circumvent errors on the private WiFi config in
case the hwflags file is missing.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Tested-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-01 03:14:08 +02:00
David Bauer
439b3e0208 gluon-core: read NanoPi R2S primary MAC from LAN board data
The relevant entry for the primary MAC location was lost when rebasing
the patch on OpenWrt 21.02.

Fixes commit ded4b8a711 ("rockchip-armv8: add FriendlyARM NanoPi R2S")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-01 03:05:50 +02:00
David Bauer
260a75cd59 gluon-core: use HE radio mode if available
Configure a radio for HE (802.11ax) operation in case it's supported by
the hardware. This can be the case for 2.4 GHz as well as 5 GHz.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-29 22:23:05 +02:00
Martin Weinelt
4f53b9848c
Merge pull request #2248 from blocktrron/pr-ar71xx-cleanup 2021-06-26 23:53:23 +02:00
David Bauer
69ba8e3cfe gluon-core: fix handling of multi-port interfaces
Multi-port interfaces are stored in the network config as an array using
the ports key.
2021-06-26 19:56:17 +02:00
David Bauer
98b16933d3 gluon-core: update board.json interface path
Single LAN and WAN interfaces are now stored in the network configs
"device" key.
2021-06-26 19:55:38 +02:00
David Bauer
9fdc57c175 treewide: drop ar71xx platform specific code 2021-06-26 02:17:15 +02:00
David Bauer
38a11eaca8 gluon-core: remove default bridge devices 2021-06-22 01:59:48 +02:00
David Bauer
102fcac799 gluon-core: update ramips boardnames 2021-06-22 01:59:48 +02:00
David Bauer
a38f2a4cf1 packages: fix missing argument to posix.glob 2021-06-21 16:28:15 +02:00
David Bauer
4f68ddf0d0
Merge pull request #2242 from Dark4MD/master
ramips-mt76x8: add Xiaomi Mi Router 4A (100M Edition)
2021-06-21 16:17:25 +02:00
Matthias Schiffer
7e45878b4e
Merge pull request #2240 from blocktrron/pr-gluon-mesh-vpn-respondd-fix
gluon-mesh-vpn-core: fix potential null pointer dereferences
2021-06-16 17:29:15 +02:00
David Bauer
344f8a47db gluon-mesh-vpn-core: fix two more missing NULL checks
read_stdout can return NULL and thus the return value need to be checked
prior to accessing it.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-16 10:31:49 +02:00
Dark4MD
0b00ed9193 ramips-mt76x8: add Xiaomi Mi Router 4A (100M Edition) 2021-06-15 20:12:35 +02:00
Matthias Schiffer
f7e473edfa
gluon-mesh-vpn-tunneldigger: fix Lua mesh-vpn provider module location 2021-06-15 16:32:37 +02:00
David Bauer
7e1e9fe2bd gluon-mesh-vpn-core: avoid reading null pointer
In case the limit_ingress or limit_egress options are not present in
gluon's mesh_vpn section the respondd provider compares a string literal
with a NULL pointer, crashing respondd.

Check both pointers prior to comparing them in order to mitigate this
issue.

Suggested-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-14 11:08:38 +02:00
Matthias Schiffer
8a422ac0cb treewide: use lua-jsonc instead of lua-cjson for JSON handling during build 2021-06-12 23:30:47 +02:00
Martin Weinelt
c97be1e18a
Merge pull request #2209 from T-X/pr-batman-adv-noflood+mcast-fw-relax 2021-06-08 01:40:12 +02:00
aiyion.prime
b973c8f133 gluon-status-page: show bandwidth limits 2021-06-07 21:21:42 +02:00
aiyion.prime
c71959df68 gluon-mesh-vpn-core: add simple-tc respondd-provider
omit unlimited bandwidth limit
A value of '-' marks a streamdirection as unlimited.
2021-06-07 11:27:12 +02:00
aiyion.prime
b53997836f gluon-status-page: show vpn protocol 2021-06-05 21:39:34 +02:00
aiyion.prime
b0b80a32b7 gluon-mesh-vpn-core: add vpn protocol respondd provider 2021-06-04 18:41:10 +02:00
David Bauer
98a1c196ed mesh-vpn: fully abstract VPN methods
This fully abstracts VPN methods, making gluon-mesh-vpn-fastd and
gluon-mesh-vpn-tunneldigger completely self-contained.

Provide a LUA interface for generic interacting with VPN methods in
gluon-mesh-vpn-core and web packages.

This also adds the ability to install tunneldigger and fastd to the same
image, selecting the VPN method based on the selected domain.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-22 06:54:23 +02:00
David Bauer
436b29d767 gluon-config-mode-core: add missing uci save
A missing uci save for gluon-setup-mode caused the initial setup-process
to be stuck in a config-mode loop.
2021-05-18 19:16:18 +02:00
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