Commit Graph

1274 Commits

Author SHA1 Message Date
Foliant 65741ba1b2 Merge pull request 'Korrekter CPUPORT für TDW8890' (#1) from foliant-patch-1 into master
Reviewed-on: #1
2021-09-02 19:18:31 +02:00
Foliant 66fa7a41f8 Merge pull request 'Portorder 1-4 (4=WAN) entspricht nun Geräteaufdruck' (#2) from foliant-patch-2 into master
Reviewed-on: #2
2021-09-02 19:17:41 +02:00
Foliant 69b8f67142 Portorder 1-4 (4=WAN) entspricht nun Geräteaufdruck
Signed-off-by: Foliant <foliant@noreply.git.freifunk-franken.de>
2021-09-02 19:17:09 +02:00
Foliant e501c91dfc Korrekter CPUPORT für TDW8890
Signed-off-by: Foliant <foliant@noreply.git.freifunk-franken.de>
2021-09-02 19:13:59 +02:00
Foliant 4b65cb8152 Portzuordnung und MAC auslesen
Die sehr seltsame Portzuordnung des TP-Link TD-W9980 (Baugleich auch TD-W9980 und TD-W8980)
Außerdem Pfad ROUTERMAC

Signed-off-by: Foliant <foliant@noreply.git.freifunk-franken.de>
2021-08-31 17:05:58 +02:00
Foliant f37ea7d853 Sparsame config ohne DSL-Modem
TP-Link TD-W9980 (Baugleich auch TD-W9980 und TD-W8980) hat ein integriertes DSL-Modem, dieses ist in der vorliegenden config deaktiviert, es macht aber selbst in der Systemauslastung kaum einen Unterschied falls es doch im Build ist.

Signed-off-by: Foliant <foliant@noreply.git.freifunk-franken.de>
2021-08-31 16:57:16 +02:00
Foliant afb75f5674 Lantiq hinzugefügt
TP-Link TD-W9980 (Baugleich auch TD-W9980 und TD-W8980) verwendet Lantiq SoC
2021-08-31 16:54:14 +02:00
Fabian Bläse 55d03264d0 fff-network: use DSA network configuration for devices with DSA drivers
Some devices had to be disabled starting with OpenWrt 21.02 due to their
new DSA switch drivers.

As support for DSA configuration has since been added to fff-network,
this makes use of this configuration for devices with DSA drivers.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:44 +02:00
Fabian Bläse 15d259b98a fff-network: add support for DSA switch configuration
Starting with OpenWrt 21.02 some devices now use upstream kernel drivers
for the built-in switch instead of relying on OpenWrt's swconfig driver.

The upstream kernel drivers use the Distributed Switch Architecture
(DSA) for configuration of the switch. Instead of explicitly configuring
the hardware switch, all ports appear as distinct interfaces and linux
bridges are offloaded to the hardware switch if possible.

To keep changes small, this patch adds support for DSA devices by
setting up a linux bridge, which is then treated just like the
cpuport-interface of the swconfig driver.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:39 +02:00
Robert Langhammer c569a9a4b5 tools/dep-tree: fix broken tool
With commit 1946aaca87 the variantselection has changed.
This adapts dep-tree to the new situation.

Additional:
* The variant can now passed by as an option.
* A help text is added.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:38 +02:00
Fabian Bläse 08626f9e96 buildscript: fix fetch step
git pull combines two steps: fetch and merge. When checking out
another revision into an existing build directory, git pull tries to merge
the changes from the new revision into the current HEAD, before checking
out the new revision with git checkout. Because we apply various patches
to OpenWrt, the merge step almost certainly fails, so the new revision
is not checked out.

As the merge isn't needed anyway, use git fetch instead, which only
fetches updates from the remote without actually applying them.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:36 +02:00
Robert Langhammer 68ec1a616b treewide: colorize command ip
It is hard to read non colorized ip output.
This adds an alias to colorize ip by default.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:17:27 +02:00
Fabian Bläse d252d5110a fff-network: Add comments to set sysctls
To make it clear why the set sysctls are necessary, add appropriate
comments to them. Also reorder them for improved readability.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:17:17 +02:00
Fabian Bläse 5d5eb29518 fff-network: Remove obsolete and unnecessary sysctls
Many of the set sysctls are either unnecessary, are already default in
the kernel or in OpenWrts defaults, or the reason for them being
explicitly set is unknown.

Remove all those sysctls from fff-network, as unfounded deviations from
default values will cause hard-to-debug problems in the future.

The original motivation for this patch is the netdev_max_backlog sysctl,
which was set to a very low value without any reason or comment.
This hurt forwarding performance on mt7621 with DSA significantly and
took quite a while to discover.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:16:55 +02:00
Fabian Bläse 50e7d6a238 buildscript: exit on errors
Exit on errors, to make unsuccessful runs more obvious.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:44 +02:00
Fabian Bläse 2090c9124b buildscript: Use fff OpenWrt mirror
Use the git.freifunk-franken.de OpenWrt mirror for OpenWrt itsel and
OpenWrt feeds to reduce upstream traffic.

This is especially important since a clean build currently requires
a fresh clone of all repositories.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:17 +02:00
Adrian Schmutzler 6e9685048b OpenWrt: bump to v21.02.0-rc3
Bump core, packages and routing.

Refresh patches.

This includes babeld 1.10.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:13 +02:00
Adrian Schmutzler e39e986a59 fff-network: adapt support for TP-Link CPE210/510 v1
This migrates the support for the TP-Link CPE210 v1 and CPE510 v1
so they are recognized by the new two-port setup code.

Assignment of ports should be consistent to the ar71xx implementation,
i.e. primary port (PoE in) assigned to WAN and secondary port (PoE out)
assigned to CLIENT by default.
Note that this is the exact opposite of the default configuration of
what OpenWrt does (but both have been consistent in behavior).

Since they work again, also re-enable image transfer.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:12 +02:00
Adrian Schmutzler 950dcd1f1c fff-network: improve "-n" vs. "-z" test in configurenetwork
Simplify a single test.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:11 +02:00
Adrian Schmutzler c22032e254 fff-network: support native two-port devices
Support native two-port devices by adding TWO_PORT variable and
exploiting the LAN0PORT and LAN1PORT variables designed for the
TP-Link CPE devices. Since the latter have been converted to
real two-port devices, we can now repurpose these variable for
the new setup.

This exploits the existing WANDEV and SWITCHDEV variables to
define the primary and secondary interfaces.

Note that by default this takes the initial values from network.mode,
so if initial WAN/CLIENT should swapped, this has to be added to
the relevant network.* file of the devices.

No device-specific changes are done in this patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:10 +02:00
Adrian Schmutzler 47db8d31be fff-network: fix code flow for one-port devices in configurenetwork
So far, all one-port devices also triggered the switch-based setup
in configurenetwork, as the one-port condition was not checked
there. While the relevant parts are overwritten by the one-port
config which comes later in the script, it still creates a lot
of useless/broken switch/vlan setup entries in /etc/config/network.

Properly check for one-port vs. non-one-port in the file, without
touching anything else.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-07-09 10:04:07 +02:00
Fabian Bläse 8702fdd823 fff-sysupgrade: Keep ed25519 and ecdsa host key on system upgrade
Dropbear supports ed25519 keys since OpenWrt 21.02.
Also, ecdsa is supported since v19.07, but disabled in our firmware.

Keep the generated ed25519 and ecdsa host key accross upgrades.

While at it, remove dss host keys, as they are not supported anymore.

5eb7864aadd5 ("dropbear: rewrite init script startup logic to handle both host key files")
8a7a93947004 ("dropbear: remove generation and configuration of DSS keys")

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-20 20:23:58 +02:00
Fabian Bläse 649886223f fff-wireguard: Adapt for renamed OpenWrt wireguard packages
Because wireguard is part of the Linux kernel starting with version 5.6,
the wireguard packages have been renamed upstream.

Update our dependencies to match this.

This fixes build for the layer3 variant.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[add fix comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-20 20:01:18 +02:00
Adrian Schmutzler ccdec069ef bsp: disable broken MT7621 devices
OpenWrt 21.02 has switched all MT7621 devices to DSA. Since we
do not support network config in this case, disable all these
devices by commenting out their image selectors.

Note that this will still build them, and only prevent having the
images in our dedicated folder.

If support is reestablished, this patch simply needs to be
reverted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-08 20:26:01 +02:00
Adrian Schmutzler c5c6ac8ce4 bsp: disable broken TP-Link CPE210/CPE510 v1
OpenWrt 21.02 only uses ath79, ar71xx has been dropped. However,
in ath79 the TP-Link CPE210 v1 and CPE510 v1 are implemented as
two-port devices. We currently do not support that in our firmware.

Thus, disable both devices by commenting out their image selectors.

Note that this will still build them, and only prevent having the
images in our dedicated folder.

If support is reestablished, this patch simply needs to be
reverted.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-08 20:21:22 +02:00
Adrian Schmutzler 54ec8f8e3b bsp: update mpc85xx subtarget from generic to p1010
The subtarget has been renamed upstream, so let's just update our
stuff.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:15:33 +02:00
Adrian Schmutzler a79bdf7594 ath79: implement both versions of ubnt,bullet-m
The Bullet M (XM) was sold with two different SoCs, AR7241 and
AR7240, which cannot be served by one DTS. This implements both
versions as done in OpenWrt.

Note that those variants may not be distinguished from the outside.
The AR7241 version appears to be the more recent and more abundant
version.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:15:30 +02:00
Adrian Schmutzler aafd9edd1d OpenWrt: mac80211: add back ath10k_pci memory hacks
These hacks have been removed in OpenWrt commit 1e27befe63ff ("mac80211:
remove ath10k_pci memory hacks").

However, since we still use mainline ath10k, we will need them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:12:46 +02:00
Adrian Schmutzler 9c1f750a95 OpenWrt: remove libustream and certs from default packages
This effectively reverts upstream commit e79df3516d3e ("build: add
libustream and certs to default pkgs").

The libustream-wolfssl library conflicts with the libustream-mbedtls
we are selecting in fff-web-ui and is probably much bigger.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:08:58 +02:00
Adrian Schmutzler 68c7d75a1b treewide: exploit label MAC address from OpenWrt
In the latest release, OpenWrt provides the label MAC address for
many devices. All of our devices should be covered.

In can be retrieved by the function

  get_mac_label

from /lib/functions/system.sh

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:08:20 +02:00
Adrian Schmutzler e850e221db treewide: update names for OpenWrt 20.xx
Some devices were renamed since the last stable release.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:01:54 +02:00
Adrian Schmutzler 66dce0cf3a OpenWrt: bump to v21.02.0-rc1
Bump core, packages and routing.

Refresh patches, remove upstreamed ones.

The patch "Add batman-adv patch to remove gw mode switch message" is
removed since batman-adv dropped the sysfs entirely. There was no
obvious replacement for the debug output, so this is dropped until
the problem is found again with a different source (which may never
happen).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-06-08 20:01:44 +02:00
Adrian Schmutzler 858930547b treewide: use SPDX license identifiers
The SPDX license identifier provides a standardized way for specifying
licenses that is both human- and machine-readable. It is used upstream
both in OpenWrt and the Linux kernel.

Replace licenses in our repository by those identifiers.

The full-text licenses corresponding to these identifiers are
provided in the LICENSES folder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:53:26 +01:00
Adrian Schmutzler b856007098 buildscript: remove obsolete template rewrite
We do not use any *.tpl files anymore, so remove the routine for
installing them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:41:38 +01:00
Adrian Schmutzler 0c83c0e820 buildscript: do not overwrite build directory on prepare
So far, we remove the old and copy a fresh new OpenWrt directory
into the build directory on prepare. There is no need to do this,
as OpenWrt/Make is capable of detecting changes and we do properly
update the feeds and patches already.

So, just clone the OpenWrt main repo into builddir directly, and
just checkout/apply patches during prepare.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:40:36 +01:00
Adrian Schmutzler ec0586bdf6 OpenWrt: bump to 19.07.7
Bump main repo, packages and routing.

Refresh patches, drop patch applied to mt76.

Relevant changes are mostly security fixes for netifd and odhcp6c
and bug fixes for dnsmasq.

More information:
https://openwrt.org/releases/19.07/notes-19.07.7

This also includes two non-trivial fixes to alfred (openwrt-routing):

97e760095578 ("alfred: Fix procd process handling for disable state")
369908cb0a0e ("alfred: Start up alfred without valid interfaces")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-03-02 13:03:16 +01:00
Adrian Schmutzler 934ddab8e5 fff-nodewatcher: add config option to disable nodewatcher
This adds an option 'disabled' that will allow to disable
nodewatcher when desired.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:13:56 +01:00
Adrian Schmutzler cdf444651f fff-nodewatcher: specify config file as config file
This package is the owner of the config file, so add it to the
Makefile. This will have vanilla OpenWrt copy it during upgrade.

Since we disable this mechanism, it will not change anything for
our standard firmware. But it will improve the situation if this
package is used in vanilla OpenWrt.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:12:02 +01:00
Adrian Schmutzler 0475fe01f0 fff-nodewatcher: only run uci-defaults once
If /etc/config/nodewatcher already exists, a proper uci-defaults
script should not overwrite it. Since this package is the owner
of the config file, this change won't change anything for the
current firmware, but will allow to use this as a package, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:10:26 +01:00
Adrian Schmutzler 40f26d74a7 fff-nodewatcher: consolidate uci-defaults scripts
The uci-defaults scripts are meant to provide defaults for a
specific package. Distributing them across several packages makes
no sense and just makes maintainance worse.

Thus, move the network part of the initialization back to the
proper package. While at it, suppress output from add commands.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-27 16:09:22 +01:00
Robert Langhammer 811fdac32d fff-firewall: Add ipv4 ssh connection limit
With commit [1] the ipv4 firewall on wan interface was removed.
This patch adds the ssh connection limit for ipv4.
IPv6 is already limited.

[1] 52e15e072c ("fff-firewall: Remove ssh firewall on WAN interface")

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[improve commit reference]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:48:10 +01:00
Robert Langhammer b98ba27690 tools: Fix buildscript-bash-completion
The dynamic completion of the variants is broken since 1946aaca87
("fff: create proper package variants instead of copying file").
This hardcodes the available variants. They won't change often.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[add more verbose commit reference]
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:45:31 +01:00
Robert Langhammer 990862419c fff-alfred-monitoring-proxy: remove ebtables entry
Removes the firewall ebtables entry.
alfred-monitoring-proxy is only useful in layer3 variant, where no
ebtables rules are set.
With this typo the ebtables command was never active and the
resulting error was never shown.

Fixes: 9b5d3f1aeb ("fff-alfred-monitoring-proxy: add package")

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[fix typos in message, add Fixes:]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-27 14:29:50 +01:00
Adrian Schmutzler 51d3858ed4 fff-network: remove broken include for Ubiquiti UniFi AC Mesh
In '/etc/network.ubnt,unifiac-mesh', we include a file that does
not exist on ath79 anymore. This causes the script execution to
abort and will have configurenetwork not run at all, making the
device quite inaccessible.

Remove the include as it never had any use anyway. Remove another
unused include as well, and add the proper dependency instead.

This fix was first proposed more than 2.5 years ago.

Fixes: #130 (gitea)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-02-26 20:48:22 +01:00
Adrian Schmutzler 1158e0bb24 fff-nodewatcher: add available memory to data
The "available" amount of memory is helpful for several forensic
and debugging cases. Send it via alfred.

Monitoring support has already been implemented.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-02-26 20:48:05 +01:00
Fabian Bläse 3147a33c52 fff-network: Disable source address filtering
Source address filtering (RFC3704) can be used to mitigate source
address spoofing. However, strict mode only works when routes are
strictly symmetric. If routes are asymmetric, it can happen that
the best route to the source address of a packet is via a different
interface.

Because there is no guarantee that routes have to be symmetric in the
Freifunk Franken backbone network, we cannot use strict mode. Because
default routes are used in the Freifunk Franken backone, loose mode
could be used, but does not make any sense. Instead, revert back to the
kernel default setting, which currently is 0 (disabled).

While this change affects both layer3 and node variant, nothing changes
for the node firmware, because it does not forward packets.

Fixes: #123

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2021-02-18 23:20:30 +01:00
Fabian Bläse 764556b980 fff-network: Create separate interface for wan dhcp
Previously, an additional wan6 interface for SLAAC has been added, which
references the wan interface for its interface.
However, OpenWrt waits until the wan interface is completely up, until
it tries to start up interfaces that depend on it.

This not only can delay the configuration of IPv6 addresses
significantly, but also makes configuration of the wan6 interface
impossible in WAN networks with out a DHCP server.

To solve this issue, a separate interface wan4 for dhcp, which also
reference the wan interface, is created and the proto of wan is set to
none.

Fixes: #114
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-18 23:19:27 +01:00
Adrian Schmutzler 539406d96b fff-network: fix primary port for Nanostation M
Migration from ar71xx to ath79 included changes to the ethernet/switch
driver for the target. This introduced a peculiar issue where
eth0 and eth1 are swapped for several devices. Most of the relevant
cases were already covered in 1cf4d762ff ("treewide: move devices
from ar71xx to ath79").

This switch also affects the Nanostation M, where the PoE-in port
is now eth1 und the PoE-out port is eth0. However, no action was
taken in the referenced patch, as nobody was aware of it then.

Since the Nanostation M is a two-port device, which we cannot
implement properly so far, it was implemented as a one-port with
the "primary" PoE-in port so far. This was broken by the ath79
introduction and is now fixed in this patch by using the one-port
setup on eth1. That way, the PoE-in port can now be switched by
ETHMODE as usual again.

Note that custom scripts, e.g. to set up the second port, need to
be adjusted manually, as that one is eth0 now.

Fixes: 1cf4d762ff ("treewide: move devices from ar71xx to ath79")
Fixes: #109 (gitea)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-02-18 01:19:24 +01:00
Adrian Schmutzler bd15c7e178 fff-network: don't hardcode eth0 for one-ports in configurenetwork
We use the one-port implementation also on two-ports like the
Nanostation M. Therefore, hard-coding eth0 in configurenetwork
will break if the port implemented for the one-port setup
(SWITCHDEV/WANDEV) is not eth0.

Just use SWITCHDEV instead, like done for the rest of the one-port
setup.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-02-18 01:19:06 +01:00
Fabian Bläse 0927a4e51a bsp: Allow for arguments in passwd function
Previously, we have added a passwd function to our shell which executes
passwd and restarts uhttpd afterwards, so the WebUI password is updated.

This adds the ability to still pass command-line arguments to passwd.

The quoting of the shell variable $@ is special:
"$@" expands to "$1" "$2" .., so its use is correct here.

Fixes: #117

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-02-18 01:17:10 +01:00