Compare commits

...

61 Commits

Author SHA1 Message Date
Christian Dresel 6be3fce0a2 fff-web-ui: Add more information in ssl about babel peers
Add more information in the routing field about babel peers

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 13:14:13 +02:00
Christian Dresel 7c04935465 fff-web-ui: Add Routing row and move batman-adv information
To show more different routing protocols make a new row for routing

Batman-adv is the routingprotocol on the node variant and should only show if batctl
is installed and move it to the routing row

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 12:57:42 +02:00
Christian Dresel 9d82530dbe fff-web-ui: Show hood only, if fff-hoods available
The hood row make no sense in layer3 variante and should only view if fff-hoods available

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 12:51:44 +02:00
Christian Dresel 0adfa6a155 fff-web-ui: Show Babel in Software
Show which babel Version and program is enabled on the router in the webui

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 12:47:48 +02:00
Christian Dresel 264645950b fff-web-ui: Show only installed Software
Show in the field "Software" in the webui only installed software

Check if batman-adv is installed
Check if fast is installed

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 12:33:44 +02:00
Christian Dresel 513301620d fff-web-ui: Show more information about wireguard
Show more information in the WebUI about wireguard VPN connection

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 12:29:28 +02:00
Christian Dresel 9bc3b5d76e fff-web-ui: Show fastd VPN only if fastd is installed
Only show fastd data in the WebUI if fastd is installed

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 11:54:39 +02:00
Christian Dresel 1a5714d73f fff-web-ui: Move VPN to new row
To add more VPN services add a new row for VPN

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
2022-04-30 11:51:38 +02:00
Fabian Bläse 20d12f943e buildscript: drop md5 checksum
The md5 checksum has not been used by fff-upgrade since 2016 [1]. Since
md5 does not have any advantages over sha256 in our use case, drop md5
checksum entirely.

[1] da1199a55b

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2022-04-13 19:22:31 +02:00
Fabian Bläse 90c58d575b buildscript: fix checksum generation for *.img.gz binaries
The new x86_64 target produces gzip compressed binaries, so it is
necessary to generate checksums for *.img.gz files as well.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2022-04-13 19:22:31 +02:00
Fabian Bläse bc3c0b717d fff-ra: set preferred lifetime smaller than valid lifetime
A recent change (b26399283a) introduced an upper limit for the preferred
and valid lifetimes, so the statically configured addresses on the client
interface do not result in infinite lifetimes.

This upper bound is derived from the dhcp lease time. However, the
preferred lifetime is unexpectedly bound by an explicit configuration
option in recent versions of odhcpd. Due to our short dhcp leasetime,
the default value of this option is higher than the lease time, which
results preferred lifetimes longer than the valid lifetime.

As this behavior is rather unintuitive, a proper fix for it should be
done upstream (see #238). Until then, lower the preferred lifetime
option to the same value as our leasetime.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2022-04-13 19:22:27 +02:00
Robert Langhammer f3b1604ff3 nodewatcher: fix errormessage.
Insert the lost "&"

Fixes: #239

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2022-04-13 19:21:25 +02:00
Fabian Bläse 57408f5dfb fff-layer3-config: show uci syntax errors
Do not hide uci errors when checking if gateway config exists, so an
appropriate uci error message is displayed. This can be helpful to find
syntax errors.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-04-05 21:25:33 +02:00
Fabian Bläse b26399283a fff-ra: use dhcp leasetime for preferred and valid lifetime
When advertising network prefixes gathered from the interface, odhcpd
sets the preferred and valid lifetime of those prefixes in the router
advertisement to the values set for those addresses on the interface.

When prefixes are configured statically (as done in our firmware), this
means that odhcp announces these prefixes for SLAAC with infinite
preferred and valid lifetimes.

While this does not seem like a problem at first, it hurts significantly
when configuration errors are made or cables are plugged into the wrong
ports, because those addresses never vanish from devices anymore, as long
as they are powered up. Also, it makes it impossible to change prefixes
without gracefully shutting down the RA server, so it can announce zero
lifetimes for previously announced prefixes.

Sadly, odhcp does not have an option to configure these lifetimes
explicitly, but it is possible to limit these lifetimes to the lease
time configured and used for the DHCP functionality of odhcpd.
Enable the appropriate 'ra_useleasetime' option to reduce impact of the
before mentioned problems.

Fixes: #142

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-04-05 21:25:19 +02:00
Fabian Bläse 20ecca34c0 ci: add woodpecker build pipelines
Add pipeline configuration for Woodpecker CI. This tells Woodpecker how
to build our firmware, so it can automatically generate firmware images
for all commits to the master branch.

Continuous integration not only helps spotting build errors early, but
also allows non-developers to test the firmware during development.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2022-03-31 19:31:25 +02:00
Fabian Bläse 880d56d52c buildscript: Keep target name for x86
The x86 OpenWrt target does not have device names, as x86 images are
generic for various hardware. Therefore, removing the target and
subtarget from the image name results in an indistiguishable image name.

Keep the target name for x86 images, so the resulting images are
distinguishable.

Fixes: #229

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Robert Langhammer 0f67aa2504 nodewatcher: Trigger "WAN Uplink" also with vxlan
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Fabian Bläse 4bf14292f7 fff-mqtt: Switch from mosquitto-ssl to mosquitto-nossl
*-ssl variants of mosquitto require libopenssl, which increases the
storage requirement by almost 1 MB, even when compressed with squashfs.

Because we currently do not need TLS support for fff-mqtt, switch to the
nossl variant to save space and allow building for devices with 8 MiB
flash.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2022-03-31 19:31:25 +02:00
Robert Langhammer 25e227c6b9 fff-vxlan-node: disable vxlan by default
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Robert Langhammer a317557320 fff-vxlan-node: disable vxlan if no peers available
Disabling vxlan via uci solves all problemes.
A reload_config does now everything we need. Bringing up vxlan if peers available and shuting down the Interface if not.
This will also remove old fdb entries and clear the batman tables immediately.

No ifup and no extra cleaning of the fdb is required.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Robert Langhammer 4cd3b17714 fff-vxlan-node: do not set vid if GW not reachable
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Robert Langhammer 7947107ed3 fff-vxlan-node: reset vid
Reset vid if no peers are available.

If a router switches to a hood without vxlan, or the peers in the hoodfile disappear, the vid should be reset.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Robert Langhammer 378163d834 fff-vxlan-node: fix cleanup
Without "uci commit" peers do not appear in /etc/config network. Use uci show instead.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Robert Langhammer 405e0a43d5 fff-vxlan: remove uci commit
Remove this leftover from the test phase.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Fabian Bläse 41b4168290 fff-network: Do not configure switch for ONE and TWO_PORT devices
In a previous change all static configuration has been moved from
configurenetwork to a static uci-defaults script. As the configuration
of the switch is completely static, while port assignment for ONE and
TWO_PORT devices is dynamic, this patch slightly changed the condition
for the creation of the switch config.

Instead of only configuring the switch, if ONE_PORT and TWO_PORT is not
set, the switch is now always configured if a swconfig device is
present. However, some ONE and TWO_PORT devices have a swconfig device,
even though only a single physical port is connected to it. Those
devices require an unconfigured switch to function properly.

Therefore, introduce additional conditions, so the switch configuration
is not generated if ONE_PORT or TWO_PORT is set.

Fixes: 1c3328e64a ("Remove static configuration from dynamic script")

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:31:25 +02:00
Fabian Bläse 0234203bed treewide: remove ETHPORT leftovers
ETHPORT was used to configure devices with two physical ethernet ports,
one of them being connected directly to the CPU, while the other one is
connected to the internal switch of the platform.

As the GL-AR150 has been converted to the TWO_PORT codepath and no other
devices utilizes ETHPORT, remove all leftovers.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Sebastian Beck <freifunk@beibecks.de>
2022-03-31 19:31:25 +02:00
Fabian Bläse 240a506ee7 fff-network: convert GL-AR150 to TWOPORT
The GL-AR150 has two ethernet ports. One of them is connected directly
to the CPU (labeled "WAN"), while the other one (labeled "LAN") is
connected to the internal switch of the AR9330 platform.

Previously, this device had its own codepath in configurenetwork,
utilizing the ETHPORT variable, so the single physical port of the
switch could be connected to either the CLIENT or BATMAN vlan of the
SWITCHPORT.

When adding support for TWO_PORT devices, this codepath was accidentally
removed, so the LAN-Port was not configured anymore.

Configuring the internal switch is not necessary when only a single
physical port ist connected to it. Instead, leave the switch
unconfigured, so it behaves like an unmanaged vlan-transparent switch.

As we support TWO_PORT devices now, utilize the TWO_PORT codepath
(instead of the ONE_PORT codepath, which would be equivalent to the old
behaviour) to make both ports configureable. To retain the previously
configured mode of the LAN-Port, migrate ETHPORT to LAN1MODE before
executing configurenetwork.

Fixes: #222
Fixes: c22032e254 ("fff-network: support native two-port devices")

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Sebastian Beck <freifunk@beibecks.de>
2022-03-31 19:31:12 +02:00
Fabian Bläse f89503660d Simplify firmware variant selection
Instead of tampering with the 'DEFAULT' property of meta packages on
every build in a non-portable way, use the build system as intended and
select packages using an approriate build config ('.config').

This is achived by adding the approriate variant package to the build
config before expanding it using defconfig.

By that, the fff-variant-* packages and FFF_VARIANT environment variable
can be removed. Base packages required in both variants are now included
via fff-base (formerly fff-variant/default).

Besides cleaning up the build process, this change also fixes a recent
issue with build dependencies, as they are evaluated on a per-package
basis instead of per-variant. Due to that, dependencies of all
variants are compiled, regardless of the selected variant. Combined with
a recent build issue of mosquitto (see [1]), the node variant could not
be built from a clean state.

[1] https://github.com/eclipse/mosquitto/issues/2432

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-03-31 19:17:01 +02:00
Robert Langhammer 7a5bef0d7d fff-fastd: fix fastd start/stop
fastd startup changed to procd. That's why it's broken.
Now a fastd reload can be used for all conditions.
An extra fastd stop is implemented to bring down the Interface.
fastd reload doesn't do that.

Fixes: #215

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-23 19:47:38 +01:00
Robert Langhammer 8e127a3936 fff-vpn-select: do not configure peers on vpn-stop
There are two reasons why there should be no peers.
Meshrouter without wan or no peers in hoodfile for a protocol.
With this patch there is only one condition left for vpn-start-stop.
Peers present or not. And it is less complicated to implement start/stop.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-23 19:47:22 +01:00
Christian Dresel 2bc21aa63f fff-layer3: Add latency to nodewatcher
This patch add the latency to the nodewatcher data.

The target of the ping can configure in /etc/config/fff

Example:

config latency 'latency'
	option ipv4 'ff1.zbau.f3netze.de'
	option ipv6 'ff1.zbau.f3netze.de'

if no target is set, no latency is send.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Acked-by: Fabian Bläse <fabian@blaese.de>
2022-03-23 19:47:05 +01:00
Fabian Bläse a43b37e9f6 fff-babel: Make implementation runtime switchable
Some users might want to prefer one babel implementation over another
for various reasons. Having to compile the firmware from scratch can be
quite tedious in that case.

Instead, make the babel implementation switchable at runtime.

The implementation can be switched manually using the uci option
`babelimpl.impl.impl`, which currently is not upgrade-safe.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2022-03-23 19:47:02 +01:00
Fabian Bläse 803e2746df Add bird2 as selectable babel implementation
Bird 2 has a few advantages over babeld. Especially the possiblity to
dynamically reload the configuration without restarting the daemon and
birds significant performance advantage make it an interesting
alternative to babeld for our firmware.

This adds the necessary implementation-specific fff-babel-bird2 package,
which allows to integrate bird2 into the fff firmware.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2022-03-23 19:46:58 +01:00
Fabian Bläse 71d137d4f1 Add support for different babel implementations
To be able to swap out babeld for a different babel implementation in
the future, this splits all fff-specific configuration into a seperate
fff-babel package.

Implementation specific configuration is done in
/lib/functions/fff/babeldaemon, which is included with every selectable
babel implementation. It contains functions, which are called by the
fff-specific code, and therefore allows to configure the implementation
specific parts.

The babel implementation is provided by implementation-specific
fff-packages, which provide 'fff-babel-implementation'. At the moment,
only fff-babeld is supported for use as babel implementation.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2022-03-23 19:46:30 +01:00
Fabian Bläse 128a748626 Add support for x86_64
This patch adds support for the x86_64 target. Both legacy and UEFI boot
are supported.

Currently, only a single network interface is supported, which is
configured like any other ONE_PORT device. Therefore, this target is not
very useful for the node variant. However, vlan interfaces can be
configured for client, wan and peering sections in the layer3
configuation.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-11 12:34:59 +01:00
Fabian Bläse 9a3b499cae fff-babeld: create filter for prefixes used with snat
If a prefix is used for a client interface utilizing snat, it shall
not be publicly reachable, so it can be reused across multiple routers.

To prevent such prefixes from leaking, create appropriate babel filters
if snat is used.

Fixes: #196

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
2022-03-11 12:34:32 +01:00
Johannes Kimmel 87d923c1ef fff-dhcp: increase dns cachesize
The default cachesize for dnsmasq is 150 entries, which results in a
poor cache hit rate.

Raise the default to 1024 to provide better cache hit rates on all
devices while still keeping memory usage in check.

Further increase the cachesize to 8192 entries for systems with enough
ram (currently more than 64MB).

The memory usage will increase roughly 100B per entry.

The size was chosen empirically. Higher values don't seem to increase
cache hit rate a lot.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2022-03-05 19:31:00 +01:00
Christian Dresel 0e8c32a363 fff-layer3: add snmp-utils package
This adds snmp-utils support to facilitate testing future uses for s2nproxy

WIP/RFC for s2nproxy:
freifunk-franken/firmware#194

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2022-03-05 18:19:20 +01:00
Fabian Bläse a5ad4a9b00 fff-config: Set panic on OOM
The OOM killer does not make much sense on a router, because regardless
of which process is killed, most of the time some essential core
functionality is affected.

Set the panic on OOM sysctl, so every OOM leads to a kernel panic and
results in a reboot of the router, which restores a clean state.

Fixes: #131

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:19:13 +01:00
Fabian Bläse 17bc1a7e62 fff-layer3-config: Always clear client interface list completely
Previously, some interfaces in the client ifname list have been kept.
The actual reason for this is unknown, it might have been used for the
bat0 interfaces.

Filtering the interface list in this way might lead to interfaces being
retained unintentionally, especially with the diverse naming of DSA
interfaces.

As it is not required anymore, remove the retention of some interfaces
completely.

Fixes: #207

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:19:02 +01:00
Fabian Bläse 330ed1b52d build_patches: Add hack which fixes forwarding on a stacked bridge
Currently we are utilizing stacked bridges to keep configuration of DSA
devices as close as possible to swconfig devices. The lower bridge is
for configuration of the DSA hardware and is vlan-aware, while the upper
bridge is used to connect wireless interfaces to the client interface.

A packet arriving from the switch might have the offload_fwd_mark flag
set in the skb to prevent it from being sent to DSA ports, as this has
already been done in hardware.

However, this flag is not cleared before the skb is processed by the
upper bridge, which prevents it from being sent to any other ports of
that bridge. Therefore, communication is not possible between different
ports of that bridge, while communication with the bridge interface
itself is possible.

This issue affects both the layer3 and node variant, but due to the
layer 2 architecture of the node firmware, it is far more noticeable in
the node firmware, as it prevents ethernet clients from sending packets
to the gateway.

Work around this issue by clearing the offload_fwd_mark flag before
passing the skb up.

Fixes: #205

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:18:51 +01:00
Fabian Bläse 5b23824344 fff-network: Remove hardcoded network config
The base network configuration has been completely migrated to
uci-defaults scripts and any existing network configuration is dropped.

Therefore, the hardcoded /etc/config/network configuration file is not
required anymore. Remove it.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:47 +01:00
Fabian Bläse 5424eb728c fff-network: restore accidentally removed packet_steering option
With the recent rework of the network configuration, any existing
configuration is dropped in a uci-defaults script (22-network-base) and
generated from scratch. When rebasing this rather old patchset, the
packet_steering option was overlooked, so it is missing now.

Restore the removed packet_steering option by setting it using a
dedicated uci-defaults script.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:21 +01:00
Fabian Bläse 209c9debbf treewide: reorder layer3-specific uci-default scripts
With a recent patchset the initial boot process of the fff-network
package has been significantly altered. The base network configuration
is now generated by a uci-defaults script which completely drops
any existing network configuration first (22-network-base).

Reorder some uci-defaults scripts which extend the base network
configuration with layer3-specific rules, so they are executed after
22-network-base.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:02 +01:00
Fabian Bläse 1c3328e64a Remove static configuration from dynamic script
Most of the configuration done in configurenetwork is static and does
not change after the first boot. Move this static configuration into a
uci-defaults script, which is only executed on first boot.

Configuration which might be changed at runtime (e.g. port assignment),
is kept in the configurenetwork script.

To improve readability and speed, combine multiple uci commands into a
uci batch. Drop any existing network configuration before applying our
own configuration. This requires the network.globals section to be
created explicitly. Also, the fdff:: addresses, ETHMESHMAC and ROUTERMAC
can be set unconditionally, as the uci-defaults script is only executed
once. Other than that, the static configuration has not been altered.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:18:00 +01:00
Fabian Bläse a8ce8e1ad6 fff-network: Remove unnecessary restart of fff-uradvd
The explicit restat of fff-uradvd is not necessary anymore, as
appropriate procd reload triggers have been added, and reload_config is
executed after every run of configurenetwork.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:17:59 +01:00
Fabian Bläse 3f765e4ba7 fff-network: Replace runtime configuration with reload_config
Instead of both setting values in the uci configuration and applying
them manually, only set the values in the uci configuration and do a
combined reload_config afterward.

This not only ensures that the changes to the configuration are actually
correct, but also decreases the runtime of configurenetwork.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:17:58 +01:00
Fabian Bläse 1917c8a1df fff-uradvd: Add reload trigger for network
fff-uradvd depends on values stored in the uci network config.
Therefore, a reload is required if the uci network config is modified.

As fff-uradvd does not support reloads, and possibly changing values are
given as command parameters, do a restart on procd reload.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2022-03-05 18:17:25 +01:00
Fabian Bläse c2f80c9999 OpenWrt: bump to v21.02.2
Bump core, packages and routing.

Remove upstreamed build patches.

Remove ath10k memory hack and use the newly added ath10k-smallbuffers
variant instead, but only for devices which actually require it
(and therefore use ath10k-ct-smallbuffers by default).

Adjust for the newly introduced band option for wireless devices, which
is now emitted by OpenWrt by default.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-03-05 18:09:49 +01:00
Adrian Schmutzler 27baecaf37 treewide: set PKG_RELEASE automatically
COMMITCOUNT allows to have the PKG_RELEASE calculated automatically
based on the number of commits for the package folder.

AUTORELEASE will count the number of commits since the last upstream
bump. This is relevant for packages with PKG_VERSION or
PKG_SOURCE_DATE set, but will not work for us since it assumes the
use of certain identifiers in commit titles.

COMMITCOUNT works fine for most of our packages, with the following
exceptions:

 * fff-nodewatcher would yield a commit count of 55, while the
   current PKG_RELEASE is 61. Thus, we do not touch it for now.

 * Packages that have been renamed will start counting from 1 after
   the rename, since folder renames are not tracked by git. This
   will result in descreasing PKG_RELEASE after the change for
   these packages.
   However, since moving essentially creates a new package anyway,
   counting from 1 makes sense conceptually, and PKG_RELEASE is
   still replaced for these packages.

 * alfred-json and fff-macnock use upstream code and thus would
   normally require AUTORELEASE. As discussed above, this will
   not work for us, so just leave these two untouched.

Note that all this is quite irrelevant for the way we use packages
currently, as without opkg PKG_RELEASE does not matter to us anyway.
So, let's just be happy about not having to bump PKG_RELEASE
anymore, while keeping the basic functionality intact.

The only package where the PKG_RELEASE is actually used for
something is fff-nodewatcher, where the version will be displayed
in the Monitoring.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fabian@blaese.de: rebase, add new packages]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-09 22:03:09 +01:00
Christian Dresel 825d760bd8 Add package fff-layer3-snat
With this new package it is possible to do SNAT for client IPv4.

The user must set a router_ip in gateway.meta.router_ip, so an ip
address is available for peering interfaces and reachability.

Currently, no extra filtering is done, so the client interface should
only use ip ranges, which are already filtered from being announced
(e.g. 192.168.0.0/16).

Using NAT for IPv4 significantly reduces the need for big
Freifunk-global IP range allocations.

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
Co-authored-by: Fabian Bläse <fabian@blaese.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Christian Dresel <freifunk@dresel.systems>
2022-01-09 21:58:30 +01:00
Fabian Bläse 51ec3648cf fff-babeld: Simplify CIDR mask removal
The removal of CIDR masks from ip addresses is changed to utilize
variable substitutions, which simplifies the expression.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-06 01:07:17 +01:00
Fabian Bläse 8ef6dba5a1 fff-babeld: Only select first list entry from router_ip
The router_ip option can be a list of multiple ip addresses. It is also
possible to specify a subnet using a CIDR mask.

Only a single ip is required for peering interfaces, so select only the
first list entry and remove the CIDR mask.

Fixes: #197

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2022-01-06 01:07:15 +01:00
Robert Langhammer a6b90f1a83 vxlan-node-vpn: add initial vid
Without a vid, netifd is running in an ifup-loop.
This situation is comming up after firstboot. An existing hoodfile causes a set vid.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Johannes Kimmel <fff@bareminimum.eu>
2022-01-05 22:18:20 +01:00
Robert Langhammer 085dbb64fe fff-fastd: Add batman hardif hop_penalty
Openwrt v21.02.0 contains a new Batman Adv that now offers hop_penalty per hardif.
We can use this to prefer one tunnel for outgoing traffic if there are several VPNs. Eg. fastd and vxlan.

This Patch sets the hop_penalty for the fastd tunnel to 30.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-12-30 16:21:47 +01:00
Robert Langhammer 12f60419cd fff-node: Add package fff-vxlan-node-vpn
This package adds vxlan support to the node variant and configures the vxlan-vpn tunnels to the gateways.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Fabian Bläse <fabian@blaese.de>

---
A vpn section for vxlan in hoodfile:

    "vpn": [
       {
        "name": "gatewayname",
        "protocol": "vxlan",
        "address": "gateway.url" (or IP)
       }

"name" is optional.
---
2021-12-30 16:21:37 +01:00
Robert Langhammer 1febd2a9b2 fff-vpn-select: Make vpn-select modular
This rewrite makes vpn-select modular to easely add new vpn-protocols.

The stuff dependent on the vpn-protocol is outsourced to files in /usr/lib/vpn-select.d/ and comes in with the respective vpn package. In this way it is easy to select or deselect vpnprotocols to be build in.

vpn-stop is removed to use the protocol independent start/stop mechanism of vpn-select. Instead, a symlink is used.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2021-12-30 16:21:29 +01:00
Johannes Kimmel feeead6c43 fff-firewall: remove obsolete rules
20-clamp-mss:

Clamping is done in other parts of the network and to a very low static
value. This rules is very likely doing nothing at the moment.

20-filter-ssh:

These rules make use of the conntrack module to ratelimit incoming
connections. Using conntrack comes with a performance penalty for all
traffic. As an alternative, dropbear could be run behind an inetd(-like)
service that does the ratelimit, should removing this rule result in an
actual attack vector.

Removing both rules would enable us to unload the conntrack module all
together, potentially improving overall performance.

Fixes #183

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Acked-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:02:02 +01:00
Johannes Kimmel 9d745d0d5c fff-layer3-config: add missing -q option for uci get
Suppresses the unhelpful "uci: Entry not found" message when running
configure-layer3 -c in case there is no `ip6addr` set on the client
interface.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:01:44 +01:00
Fabian Bläse 7c3f3230ff buildscript: Split removal of chipset and subtarget
Some OpenWrt targets do not have subtargets. The filename only contains
the chipset in that case. Split the removal of chipset and subtarget
into multiple expressions, so the removal of the chipset works on
targets without subtargets as well.

Fixes: #187

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:01:36 +01:00
Fabian Bläse a3d62c7fcc Revert "Retain old compat_version for sysupgrade compatibility"
This reverts commit de9d4abf44.

As the compat_version has been bumped with the last release, this hack
can be removed, because the compat_version now is in sync with upstream.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2021-12-30 16:01:12 +01:00
93 changed files with 1221 additions and 4859 deletions

45
.woodpecker.yml Normal file
View File

@ -0,0 +1,45 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
tags: true
pipeline:
buildall-layer3:
image: openwrtorg/imagebuilder
commands:
- export HOME=/home/build/openwrt
- sudo chown -R build:build .
- git config --global user.email "ci@fff.community"
- git config --global user.name "FFF CI"
- ./buildscript selectvariant layer3
- ./buildscript selectbsp bsp/ath79-generic.bsp
- ./buildscript prepare
- ./buildscript buildall
buildall-node:
image: openwrtorg/imagebuilder
commands:
- export HOME=/home/build/openwrt
- sudo chown -R build:build .
- git config --global user.email "ci@fff.community"
- git config --global user.name "FFF CI"
- ./buildscript selectvariant node
- ./buildscript selectbsp bsp/ath79-generic.bsp
- ./buildscript prepare
- ./buildscript buildall
distribute:
image: alpine/git
volumes:
- /var/lib/woodpecker/artifacts:/var/run/artifacts
commands:
- rm -rf /var/run/artifacts/$(git describe --tags)
- mkdir -p /var/run/artifacts/$(git describe --tags)
- cp -r bin/* /var/run/artifacts/$(git describe --tags)/
- echo
- echo
- echo "You can download the built firmware images here:"
- echo "https://ci.fff.community/artifacts/$(git describe --tags)"
branches: [ master ]

View File

@ -7,11 +7,11 @@ CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_glinet_gl-ar150=""
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c25-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v5=y
@ -88,6 +88,7 @@ CONFIG_PACKAGE_wpad-mini=m
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
CONFIG_PACKAGE_ath10k-firmware-qca9888=m
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
CONFIG_PACKAGE_kmod-ath10k-smallbuffers=m
CONFIG_PACKAGE_kmod-ath10k=m
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m

4
bsp/x86-64.bsp Normal file
View File

@ -0,0 +1,4 @@
chipset=x86
subtarget=64
images=("openwrt-${chipset}-${subtarget}-generic-squashfs-combined-*"
)

18
bsp/x86-64/.config Normal file
View File

@ -0,0 +1,18 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_DEVICE_generic=y
# CONFIG_TARGET_ROOTFS_EXT4FS is not set
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y

View File

@ -1,890 +0,0 @@
From 0b7311300b01d9975e9996327ee469e4f66fb2ec Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 6 Nov 2021 19:29:39 +0000
Subject: [PATCH] kernel: bump 5.4 to 5.4.158
Removed upstreamed:
generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
All others updated automatically.
Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/kernel-version.mk | 4 +-
...mware-loader-for-uPD720201-and-uPD72.patch | 10 ++--
.../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +-
...Show-that-the-VIA-VL805-supports-LPM.patch | 2 +-
...-for-updating-interrupt-endpoint-int.patch | 4 +-
...hci_fixup_endpoint-for-interval-adju.patch | 4 +-
...or-host-controllers-that-don-t-updat.patch | 6 +-
...-0504-mmc-sdhci-Silence-MMC-warnings.patch | 4 +-
...-quirks-add-link-TRB-quirk-for-VL805.patch | 4 +-
...ast-GRO-for-skbs-with-Ethernet-heade.patch | 2 +-
...-net-phy-add-core-phylib-sfp-support.patch | 4 +-
...-not-propagate-bridge-updates-across.patch | 60 -------------------
...sfs-attributes-for-VPD-pages-0h-and-.patch | 10 ++--
.../generic/hack-5.4/220-gc_sections.patch | 2 +-
.../generic/hack-5.4/721-phy_packets.patch | 2 +-
...ng-with-source-address-failed-policy.patch | 26 ++++----
...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 ++--
...dd-support-for-threaded-NAPI-polling.patch | 14 ++---
.../811-pci_disable_usb_common_quirks.patch | 2 +-
...arch-arm-force-ZRELADDR-on-arch-qcom.patch | 2 +-
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
.../900-arm-add-cmdline-override.patch | 2 +-
...5-NET-MIPS-lantiq-adds-xrx200-legacy.patch | 2 +-
...move-EH-SINGLE_STEP_SET_FEATURE-impl.patch | 4 +-
...host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch | 4 +-
...host-xhci-do-not-return-error-status.patch | 2 +-
...-host-xhci-add-.bus_suspend-override.patch | 2 +-
.../901-fix_irq_type_of_pca953x.patch | 2 +-
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
.../patches-5.4/200-add-ralink-eth.patch | 2 +-
.../990-NET-no-auto-carrier-off-support.patch | 4 +-
...net-add-support-for-rtl838x-ethernet.patch | 2 +-
33 files changed, 73 insertions(+), 133 deletions(-)
delete mode 100644 target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 83bfcd8ff2..688660cbbd 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
-LINUX_VERSION-5.4 = .154
+LINUX_VERSION-5.4 = .158
-LINUX_KERNEL_HASH-5.4.154 = 058994f4666b6b0474a4d5228583e394594e406783b7e93d487c2a66c35f3c06
+LINUX_KERNEL_HASH-5.4.158 = 6e018fecdc8fc24553756e582d83b82d65b10a6b03ef36262a24911f839b8d59
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
index 980a0407db..220e5da73b 100644
--- a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
+++ b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
@@ -48,7 +48,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
#include "xhci.h"
#include "xhci-trace.h"
-@@ -64,6 +66,44 @@
+@@ -65,6 +67,44 @@
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
#define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
@@ -93,7 +93,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
static const char hcd_name[] = "xhci_hcd";
static struct hc_driver __read_mostly xhci_pci_hc_driver;
-@@ -309,6 +349,873 @@ static void xhci_pme_acpi_rtd3_enable(st
+@@ -311,6 +351,873 @@ static void xhci_pme_acpi_rtd3_enable(st
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
#endif /* CONFIG_ACPI */
@@ -967,7 +967,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
/* called during probe() after chip reset completes */
static int xhci_pci_setup(struct usb_hcd *hcd)
{
-@@ -350,6 +1257,27 @@ static int xhci_pci_probe(struct pci_dev
+@@ -352,6 +1259,27 @@ static int xhci_pci_probe(struct pci_dev
struct hc_driver *driver;
struct usb_hcd *hcd;
@@ -995,7 +995,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
driver = (struct hc_driver *)id->driver_data;
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
-@@ -411,6 +1339,16 @@ static void xhci_pci_remove(struct pci_d
+@@ -413,6 +1341,16 @@ static void xhci_pci_remove(struct pci_d
{
struct xhci_hcd *xhci;
@@ -1012,7 +1012,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
xhci = hcd_to_xhci(pci_get_drvdata(dev));
xhci->xhc_state |= XHCI_STATE_REMOVING;
-@@ -550,6 +1488,11 @@ static int xhci_pci_resume(struct usb_hc
+@@ -552,6 +1490,11 @@ static int xhci_pci_resume(struct usb_hc
if (pdev->vendor == PCI_VENDOR_ID_INTEL)
usb_enable_intel_xhci_ports(pdev);
diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
index 4217a1e949..6980ce80ee 100644
--- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -13,7 +13,7 @@ produce a noisy warning.
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -288,6 +288,7 @@ static void xhci_pci_quirks(struct devic
+@@ -290,6 +290,7 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x0015) {
xhci->quirks |= XHCI_RESET_ON_RESUME;
xhci->quirks |= XHCI_ZERO_64B_REGS;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch
index 5679126103..cf3cb58362 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch
@@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -257,6 +257,10 @@ static void xhci_pci_quirks(struct devic
+@@ -259,6 +259,10 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x3432)
xhci->quirks |= XHCI_BROKEN_STREAMS;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
index 9e886ee2df..f654cd8a57 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
@@ -81,7 +81,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
extern int usb_driver_set_configuration(struct usb_device *udev, int config);
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
-@@ -384,6 +384,11 @@ struct hc_driver {
+@@ -382,6 +382,11 @@ struct hc_driver {
* or bandwidth constraints.
*/
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
@@ -93,7 +93,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
/* Returns the hardware-chosen device address */
int (*address_device)(struct usb_hcd *, struct usb_device *udev);
/* prepares the hardware to send commands to the device */
-@@ -445,6 +450,8 @@ extern void usb_hcd_unmap_urb_setup_for_
+@@ -443,6 +448,8 @@ extern void usb_hcd_unmap_urb_setup_for_
extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *, struct urb *);
extern void usb_hcd_flush_endpoint(struct usb_device *udev,
struct usb_host_endpoint *ep);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
index 1016627521..b316ef8180 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -1469,6 +1469,103 @@ command_cleanup:
+@@ -1468,6 +1468,103 @@ command_cleanup:
}
/*
@@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* non-error returns are a promise to giveback() the urb later
* we drop ownership so next owner (or urb unlink) can get it
*/
-@@ -5358,6 +5455,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5362,6 +5459,7 @@ static const struct hc_driver xhci_hc_dr
.endpoint_reset = xhci_endpoint_reset,
.check_bandwidth = xhci_check_bandwidth,
.reset_bandwidth = xhci_reset_bandwidth,
diff --git a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
index 947b00b398..683f0905ef 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -258,8 +258,10 @@ static void xhci_pci_quirks(struct devic
+@@ -260,8 +260,10 @@ static void xhci_pci_quirks(struct devic
xhci->quirks |= XHCI_BROKEN_STREAMS;
if (pdev->vendor == PCI_VENDOR_ID_VIA &&
@@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -550,7 +550,10 @@ void xhci_find_new_dequeue_state(struct
+@@ -556,7 +556,10 @@ void xhci_find_new_dequeue_state(struct
struct xhci_virt_ep *ep = &dev->eps[ep_index];
struct xhci_ring *ep_ring;
struct xhci_segment *new_seg;
@@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
dma_addr_t addr;
u64 hw_dequeue;
bool cycle_found = false;
-@@ -588,7 +591,28 @@ void xhci_find_new_dequeue_state(struct
+@@ -594,7 +597,28 @@ void xhci_find_new_dequeue_state(struct
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
new_seg = ep_ring->deq_seg;
new_deq = ep_ring->dequeue;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
index 89fd58dca0..ba815eecfd 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
#define MAX_TUNING_LOOP 40
-@@ -2762,7 +2762,7 @@ static void sdhci_timeout_timer(struct t
+@@ -2768,7 +2768,7 @@ static void sdhci_timeout_timer(struct t
spin_lock_irqsave(&host->lock, flags);
if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
@@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
mmc_hostname(host->mmc));
sdhci_dumpregs(host);
-@@ -2784,7 +2784,7 @@ static void sdhci_timeout_data_timer(str
+@@ -2790,7 +2790,7 @@ static void sdhci_timeout_data_timer(str
if (host->data || host->data_cmd ||
(host->cmd && sdhci_data_line_cmd(host->cmd))) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
index 627ec30f06..cc05573eb0 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -261,6 +261,7 @@ static void xhci_pci_quirks(struct devic
+@@ -263,6 +263,7 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x3483) {
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
@@ -32,7 +32,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -647,6 +647,16 @@ void xhci_find_new_dequeue_state(struct
+@@ -653,6 +653,16 @@ void xhci_find_new_dequeue_state(struct
} while (!cycle_found || !td_last_trb_found);
diff --git a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch
index eeea18bb9c..13f0d9d000 100644
--- a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch
+++ b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -5423,8 +5423,7 @@ static inline void skb_gro_reset_offset(
+@@ -5429,8 +5429,7 @@ static inline void skb_gro_reset_offset(
NAPI_GRO_CB(skb)->frag0 = NULL;
NAPI_GRO_CB(skb)->frag0_len = 0;
diff --git a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
index 11da9540e9..edfe151725 100644
--- a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
+++ b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
@@ -24,7 +24,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#include <linux/workqueue.h>
#include <linux/mdio.h>
#include <linux/io.h>
-@@ -843,6 +844,9 @@ void phy_stop(struct phy_device *phydev)
+@@ -863,6 +864,9 @@ void phy_stop(struct phy_device *phydev)
mutex_lock(&phydev->lock);
@@ -34,7 +34,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
phydev->state = PHY_HALTED;
mutex_unlock(&phydev->lock);
-@@ -905,6 +909,9 @@ void phy_state_machine(struct work_struc
+@@ -925,6 +929,9 @@ void phy_state_machine(struct work_struc
old_state = phydev->state;
diff --git a/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch b/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
deleted file mode 100644
index bc8014b772..0000000000
--- a/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 07c6f9805f12f1bb538ef165a092b300350384aa Mon Sep 17 00:00:00 2001
-From: Russell King <rmk+kernel@armlinux.org.uk>
-Date: Wed, 26 Feb 2020 17:14:21 +0000
-Subject: [PATCH] net: switchdev: do not propagate bridge updates across
- bridges
-
-When configuring a tree of independent bridges, propagating changes
-from the upper bridge across a bridge master to the lower bridge
-ports brings surprises.
-
-For example, a lower bridge may have vlan filtering enabled. It
-may have a vlan interface attached to the bridge master, which may
-then be incorporated into another bridge. As soon as the lower
-bridge vlan interface is attached to the upper bridge, the lower
-bridge has vlan filtering disabled.
-
-This occurs because switchdev recursively applies its changes to
-all lower devices no matter what.
-
-Reviewed-by: Ido Schimmel <idosch@mellanox.com>
-Tested-by: Ido Schimmel <idosch@mellanox.com>
-Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- net/switchdev/switchdev.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/net/switchdev/switchdev.c
-+++ b/net/switchdev/switchdev.c
-@@ -476,6 +476,9 @@ static int __switchdev_handle_port_obj_a
- * necessary to go through this helper.
- */
- netdev_for_each_lower_dev(dev, lower_dev, iter) {
-+ if (netif_is_bridge_master(lower_dev))
-+ continue;
-+
- err = __switchdev_handle_port_obj_add(lower_dev, port_obj_info,
- check_cb, add_cb);
- if (err && err != -EOPNOTSUPP)
-@@ -528,6 +531,9 @@ static int __switchdev_handle_port_obj_d
- * necessary to go through this helper.
- */
- netdev_for_each_lower_dev(dev, lower_dev, iter) {
-+ if (netif_is_bridge_master(lower_dev))
-+ continue;
-+
- err = __switchdev_handle_port_obj_del(lower_dev, port_obj_info,
- check_cb, del_cb);
- if (err && err != -EOPNOTSUPP)
-@@ -579,6 +585,9 @@ static int __switchdev_handle_port_attr_
- * necessary to go through this helper.
- */
- netdev_for_each_lower_dev(dev, lower_dev, iter) {
-+ if (netif_is_bridge_master(lower_dev))
-+ continue;
-+
- err = __switchdev_handle_port_attr_set(lower_dev, port_attr_info,
- check_cb, set_cb);
- if (err && err != -EOPNOTSUPP)
diff --git a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch
index 438588f9f4..8c18d5df6d 100644
--- a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch
+++ b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch
@@ -41,9 +41,9 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
struct scsi_vpd *vpd_pg80 = NULL, *vpd_pg83 = NULL;
+ struct scsi_vpd *vpd_pg0 = NULL, *vpd_pg89 = NULL;
unsigned long flags;
+ struct module *mod;
- sdev = container_of(work, struct scsi_device, ew.work);
-@@ -466,16 +467,24 @@ static void scsi_device_dev_release_user
+@@ -469,16 +470,24 @@ static void scsi_device_dev_release_user
sdev->request_queue = NULL;
mutex_lock(&sdev->inquiry_mutex);
@@ -68,7 +68,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
kfree(sdev->inquiry);
kfree(sdev);
-@@ -874,6 +883,8 @@ static struct bin_attribute dev_attr_vpd
+@@ -883,6 +892,8 @@ static struct bin_attribute dev_attr_vpd
sdev_vpd_pg_attr(pg83);
sdev_vpd_pg_attr(pg80);
@@ -77,7 +77,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
static ssize_t show_inquiry(struct file *filep, struct kobject *kobj,
struct bin_attribute *bin_attr,
-@@ -1206,12 +1217,18 @@ static umode_t scsi_sdev_bin_attr_is_vis
+@@ -1215,12 +1226,18 @@ static umode_t scsi_sdev_bin_attr_is_vis
struct scsi_device *sdev = to_scsi_device(dev);
@@ -96,7 +96,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
return S_IRUGO;
}
-@@ -1254,8 +1271,10 @@ static struct attribute *scsi_sdev_attrs
+@@ -1263,8 +1280,10 @@ static struct attribute *scsi_sdev_attrs
};
static struct bin_attribute *scsi_sdev_bin_attrs[] = {
diff --git a/target/linux/generic/hack-5.4/220-gc_sections.patch b/target/linux/generic/hack-5.4/220-gc_sections.patch
index 6207eb0ec9..fdfaf51406 100644
--- a/target/linux/generic/hack-5.4/220-gc_sections.patch
+++ b/target/linux/generic/hack-5.4/220-gc_sections.patch
@@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -111,6 +111,7 @@ config ARM
+@@ -112,6 +112,7 @@ config ARM
select HAVE_UID16
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select IRQ_FORCED_THREADING
diff --git a/target/linux/generic/hack-5.4/721-phy_packets.patch b/target/linux/generic/hack-5.4/721-phy_packets.patch
index 836fc54ba2..bc9b3a4783 100644
--- a/target/linux/generic/hack-5.4/721-phy_packets.patch
+++ b/target/linux/generic/hack-5.4/721-phy_packets.patch
@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -3192,10 +3192,20 @@ static int xmit_one(struct sk_buff *skb,
+@@ -3198,10 +3198,20 @@ static int xmit_one(struct sk_buff *skb,
if (dev_nit_active(dev))
dev_queue_xmit_nit(skb, dev);
diff --git a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
index 0b95eee494..06227cfafe 100644
--- a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
+++ b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
@@ -110,7 +110,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
return -EINVAL;
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
-@@ -93,6 +93,8 @@ static int ip6_pkt_discard(struct sk_bu
+@@ -94,6 +94,8 @@ static int ip6_pkt_discard(struct sk_bu
static int ip6_pkt_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb);
static int ip6_pkt_prohibit(struct sk_buff *skb);
static int ip6_pkt_prohibit_out(struct net *net, struct sock *sk, struct sk_buff *skb);
@@ -119,7 +119,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void ip6_link_failure(struct sk_buff *skb);
static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
struct sk_buff *skb, u32 mtu,
-@@ -326,6 +328,18 @@ static const struct rt6_info ip6_prohibi
+@@ -327,6 +329,18 @@ static const struct rt6_info ip6_prohibi
.rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP),
};
@@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__refcnt = ATOMIC_INIT(1),
-@@ -1047,6 +1061,7 @@ static const int fib6_prop[RTN_MAX + 1]
+@@ -1048,6 +1062,7 @@ static const int fib6_prop[RTN_MAX + 1]
[RTN_BLACKHOLE] = -EINVAL,
[RTN_UNREACHABLE] = -EHOSTUNREACH,
[RTN_PROHIBIT] = -EACCES,
@@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
[RTN_THROW] = -EAGAIN,
[RTN_NAT] = -EINVAL,
[RTN_XRESOLVE] = -EINVAL,
-@@ -1084,6 +1099,10 @@ static void ip6_rt_init_dst_reject(struc
+@@ -1085,6 +1100,10 @@ static void ip6_rt_init_dst_reject(struc
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
@@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -4426,6 +4445,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -4434,6 +4453,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -4906,7 +4936,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -4914,7 +4944,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -6029,6 +6060,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6037,6 +6068,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -6040,6 +6073,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6048,6 +6081,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
-@@ -6232,6 +6266,8 @@ static int __net_init ip6_route_net_init
+@@ -6240,6 +6274,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
@@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
-@@ -6242,11 +6278,21 @@ static int __net_init ip6_route_net_init
+@@ -6250,11 +6286,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
@@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
-@@ -6270,6 +6316,8 @@ out:
+@@ -6278,6 +6324,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -6289,6 +6337,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6297,6 +6345,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
@@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6366,6 +6415,9 @@ void __init ip6_route_init_special_entri
+@@ -6374,6 +6423,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 4839ac5e70..e0540866c6 100644
--- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -5489,6 +5489,9 @@ static enum gro_result dev_gro_receive(s
+@@ -5495,6 +5495,9 @@ static enum gro_result dev_gro_receive(s
int same_flow;
int grow;
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netif_elide_gro(skb->dev))
goto normal;
-@@ -7291,6 +7294,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -7297,6 +7300,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
-@@ -7341,6 +7386,7 @@ static int __netdev_upper_dev_link(struc
+@@ -7347,6 +7392,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
@@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
-@@ -7434,6 +7480,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -7440,6 +7486,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
-@@ -8164,6 +8211,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8170,6 +8217,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
diff --git a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
index f45efdf12b..febec868f4 100644
--- a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
+++ b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int netif_rx_internal(struct sk_buff *skb);
static int call_netdevice_notifiers_info(unsigned long val,
-@@ -5931,6 +5932,11 @@ void __napi_schedule(struct napi_struct
+@@ -5937,6 +5938,11 @@ void __napi_schedule(struct napi_struct
{
unsigned long flags;
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
local_irq_save(flags);
____napi_schedule(this_cpu_ptr(&softnet_data), n);
local_irq_restore(flags);
-@@ -5982,6 +5988,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
+@@ -5988,6 +5994,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
*/
void __napi_schedule_irqoff(struct napi_struct *n)
{
@@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
____napi_schedule(this_cpu_ptr(&softnet_data), n);
else
-@@ -6246,9 +6257,89 @@ static void init_gro_hash(struct napi_st
+@@ -6252,9 +6263,89 @@ static void init_gro_hash(struct napi_st
napi->gro_bitmask = 0;
}
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INIT_LIST_HEAD(&napi->poll_list);
hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
napi->timer.function = napi_watchdog;
-@@ -6265,6 +6356,7 @@ void netif_napi_add(struct net_device *d
+@@ -6271,6 +6362,7 @@ void netif_napi_add(struct net_device *d
#ifdef CONFIG_NETPOLL
napi->poll_owner = -1;
#endif
@@ -217,7 +217,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
set_bit(NAPI_STATE_SCHED, &napi->state);
set_bit(NAPI_STATE_NPSVC, &napi->state);
list_add_rcu(&napi->dev_list, &dev->napi_list);
-@@ -6305,6 +6397,7 @@ static void flush_gro_hash(struct napi_s
+@@ -6311,6 +6403,7 @@ static void flush_gro_hash(struct napi_s
void netif_napi_del(struct napi_struct *napi)
{
might_sleep();
@@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (napi_hash_del(napi))
synchronize_net();
list_del_init(&napi->dev_list);
-@@ -6317,50 +6410,18 @@ EXPORT_SYMBOL(netif_napi_del);
+@@ -6323,50 +6416,18 @@ EXPORT_SYMBOL(netif_napi_del);
static int napi_poll(struct napi_struct *n, struct list_head *repoll)
{
@@ -280,7 +280,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Some drivers may have called napi_schedule
* prior to exhausting their budget.
-@@ -10340,6 +10401,10 @@ static int __init net_dev_init(void)
+@@ -10346,6 +10407,10 @@ static int __init net_dev_init(void)
sd->backlog.weight = weight_p;
}
diff --git a/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch
index 86f8a416e9..6e4584c8a1 100644
--- a/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch
+++ b/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#endif /* __LINUX_USB_PCI_QUIRKS_H */
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
-@@ -485,7 +485,14 @@ extern int usb_hcd_pci_probe(struct pci_
+@@ -483,7 +483,14 @@ extern int usb_hcd_pci_probe(struct pci_
extern void usb_hcd_pci_remove(struct pci_dev *dev);
extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
diff --git a/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
index d3b39ac3e3..6d3e7d9ee0 100644
--- a/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
+++ b/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
@@ -33,7 +33,7 @@ Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -318,7 +318,7 @@ config ARCH_MULTIPLATFORM
+@@ -319,7 +319,7 @@ config ARCH_MULTIPLATFORM
depends on MMU
select ARM_HAS_SG_CHAIN
select ARM_PATCH_PHYS_VIRT
diff --git a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
index 751ac10a19..33c77fb729 100644
--- a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
@@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1828,6 +1828,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
The command-line arguments provided by the boot loader will be
appended to the the device tree bootargs property.
diff --git a/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch
index 49cd68b68d..17f20f068c 100644
--- a/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch
+++ b/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch
@@ -1,6 +1,6 @@
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1840,6 +1840,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL
+@@ -1841,6 +1841,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL
endchoice
diff --git a/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch b/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
index 6a2143e17e..a43982f9e1 100644
--- a/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
+++ b/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
@@ -16,7 +16,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -108,7 +108,13 @@ config LANTIQ_ETOP
+@@ -109,7 +109,13 @@ config LANTIQ_ETOP
tristate "Lantiq SoC ETOP driver"
depends on SOC_TYPE_XWAY
---help---
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch b/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch
index 3c05330b1a..d43626577b 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch
@@ -335,7 +335,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
int is_setup
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
-@@ -411,7 +411,10 @@ struct hc_driver {
+@@ -409,7 +409,10 @@ struct hc_driver {
int (*find_raw_port_number)(struct usb_hcd *, int);
/* Call for power on/off the port if necessary */
int (*port_power)(struct usb_hcd *hcd, int portnum, bool enable);
@@ -347,7 +347,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
};
static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd)
-@@ -476,6 +479,14 @@ int usb_hcd_setup_local_mem(struct usb_h
+@@ -474,6 +477,14 @@ int usb_hcd_setup_local_mem(struct usb_h
struct platform_device;
extern void usb_hcd_platform_shutdown(struct platform_device *dev);
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
index fcad77c1eb..361328cf05 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
@@ -42,7 +42,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -3624,6 +3624,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3630,6 +3630,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
return 0;
}
@@ -174,7 +174,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
* bursts that are required to move all packets in this TD. Only SuperSpeed
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -5385,6 +5385,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5389,6 +5389,7 @@ static const struct hc_driver xhci_hc_dr
.disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout,
.find_raw_port_number = xhci_find_raw_port_number,
.clear_tt_buffer_complete = xhci_clear_tt_buffer_complete,
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
index 637d514d76..e5394cc6d8 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
@@ -22,7 +22,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -2091,12 +2091,9 @@ static int process_ctrl_td(struct xhci_h
+@@ -2097,12 +2097,9 @@ static int process_ctrl_td(struct xhci_h
switch (trb_comp_code) {
case COMP_SUCCESS:
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
index 060a809f5b..f808b5b556 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
@@ -24,7 +24,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -5406,6 +5406,8 @@ void xhci_init_driver(struct hc_driver *
+@@ -5410,6 +5410,8 @@ void xhci_init_driver(struct hc_driver *
drv->check_bandwidth = over->check_bandwidth;
if (over->reset_bandwidth)
drv->reset_bandwidth = over->reset_bandwidth;
diff --git a/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
index a00a240135..5f022ac27f 100644
--- a/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
+++ b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
@@ -11,7 +11,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
-@@ -879,10 +879,12 @@ static int pca953x_irq_setup(struct pca9
+@@ -881,10 +881,12 @@ static int pca953x_irq_setup(struct pca9
for (i = 0; i < NBANK(chip); i++)
chip->irq_stat[i] &= reg_direction[i];
mutex_init(&chip->irq_lock);
diff --git a/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index fd60cdb322..b6b3247c9d 100644
--- a/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -28,7 +28,7 @@ Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1828,6 +1828,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
The command-line arguments provided by the boot loader will be
appended to the the device tree bootargs property.
diff --git a/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch
index 8c83d55b6c..bc46f308d3 100644
--- a/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch
@@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1828,6 +1828,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
The command-line arguments provided by the boot loader will be
appended to the the device tree bootargs property.
diff --git a/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch b/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
index b8fd8e511d..79e7c2309b 100644
--- a/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
+++ b/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -159,6 +159,7 @@ source "drivers/net/ethernet/pasemi/Kcon
+@@ -160,6 +160,7 @@ source "drivers/net/ethernet/pasemi/Kcon
source "drivers/net/ethernet/pensando/Kconfig"
source "drivers/net/ethernet/qlogic/Kconfig"
source "drivers/net/ethernet/qualcomm/Kconfig"
diff --git a/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch
index c19cfd322d..b53108ec3c 100644
--- a/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch
+++ b/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch
@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
-@@ -547,7 +547,10 @@ static int phy_check_link_status(struct
+@@ -549,7 +549,10 @@ static int phy_check_link_status(struct
phy_link_up(phydev);
} else if (!phydev->link && phydev->state != PHY_NOLINK) {
phydev->state = PHY_NOLINK;
@@ -23,7 +23,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
return 0;
-@@ -927,7 +930,10 @@ void phy_state_machine(struct work_struc
+@@ -947,7 +950,10 @@ void phy_state_machine(struct work_struc
case PHY_HALTED:
if (phydev->link) {
phydev->link = 0;
diff --git a/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch b/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch
index 11e62450d5..952384ac89 100644
--- a/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch
+++ b/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -163,6 +163,13 @@ source "drivers/net/ethernet/rdc/Kconfig
+@@ -164,6 +164,13 @@ source "drivers/net/ethernet/rdc/Kconfig
source "drivers/net/ethernet/realtek/Kconfig"
source "drivers/net/ethernet/renesas/Kconfig"
source "drivers/net/ethernet/rocker/Kconfig"
--
2.34.1

File diff suppressed because it is too large Load Diff

View File

@ -1,72 +0,0 @@
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Date: Wed, 10 Feb 2021 22:53:00 +0100
Subject: mac80211: add back ath10k_pci memory hacks
These hacks have been removed in 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>
diff --git a/package/kernel/mac80211/patches/ath/960-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/mac80211/patches/ath/960-ath10k-limit-htt-rx-ring-size.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e907c7ab73677a3db928ef3620d77bf22a4d752a
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/960-ath10k-limit-htt-rx-ring-size.patch
@@ -0,0 +1,11 @@
+--- a/drivers/net/wireless/ath/ath10k/htt.h
++++ b/drivers/net/wireless/ath/ath10k/htt.h
+@@ -236,7 +236,7 @@ enum htt_rx_ring_flags {
+ };
+
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
diff --git a/package/kernel/mac80211/patches/ath/961-ath10k-limit-pci-buffer-size.patch b/package/kernel/mac80211/patches/ath/961-ath10k-limit-pci-buffer-size.patch
new file mode 100644
index 0000000000000000000000000000000000000000..b5e5c3a9bb00a407096936ece1916e331e0164f5
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/961-ath10k-limit-pci-buffer-size.patch
@@ -0,0 +1,38 @@
+--- a/drivers/net/wireless/ath/ath10k/pci.c
++++ b/drivers/net/wireless/ath/ath10k/pci.c
+@@ -131,7 +131,7 @@ static const struct ce_attr pci_host_ce_
+ .flags = CE_ATTR_FLAGS,
+ .src_nentries = 0,
+ .src_sz_max = 2048,
+- .dest_nentries = 512,
++ .dest_nentries = 128,
+ .recv_cb = ath10k_pci_htt_htc_rx_cb,
+ },
+
+@@ -140,7 +140,7 @@ static const struct ce_attr pci_host_ce_
+ .flags = CE_ATTR_FLAGS,
+ .src_nentries = 0,
+ .src_sz_max = 2048,
+- .dest_nentries = 128,
++ .dest_nentries = 64,
+ .recv_cb = ath10k_pci_htc_rx_cb,
+ },
+
+@@ -167,7 +167,7 @@ static const struct ce_attr pci_host_ce_
+ .flags = CE_ATTR_FLAGS,
+ .src_nentries = 0,
+ .src_sz_max = 512,
+- .dest_nentries = 512,
++ .dest_nentries = 128,
+ .recv_cb = ath10k_pci_htt_rx_cb,
+ },
+
+@@ -192,7 +192,7 @@ static const struct ce_attr pci_host_ce_
+ .flags = CE_ATTR_FLAGS,
+ .src_nentries = 0,
+ .src_sz_max = 2048,
+- .dest_nentries = 128,
++ .dest_nentries = 96,
+ .recv_cb = ath10k_pci_pktlog_rx_cb,
+ },
+

View File

@ -1,19 +0,0 @@
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Sat, 23 Oct 2021 23:34:07 +0200
Subject: [PATCH] mt7621: retain old compat_version
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index a3bc14d59d..99887e8192 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -91,8 +91,7 @@ define Build/zytrx-header
endef
define Device/dsa-migration
- DEVICE_COMPAT_VERSION := 1.1
- DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
+ DEVICE_COMPAT_VERSION := 1.0
endef
define Device/adslr_g7

View File

@ -0,0 +1,32 @@
From f53b71d2907eeb0d80e79d99fa7b756b5e5bf32b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Thu, 24 Feb 2022 00:04:47 +0100
Subject: [PATCH] Add hack which fixes forwarding on a stacked bridge
configuration using DSA
---
.../hack-5.4/999-fix-stacked-bridge-forwarding.patch | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
diff --git a/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch b/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
new file mode 100644
index 0000000000..e1d4cb9cd5
--- /dev/null
+++ b/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
@@ -0,0 +1,12 @@
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -52,6 +52,9 @@ static int br_pass_frame_up(struct sk_bu
+ return NET_RX_DROP;
+ }
+
++ /* remove offload flag, so upper bridges do not drop the packet */
++ br_switchdev_frame_unmark(skb);
++
+ indev = skb->dev;
+ skb->dev = brdev;
+ skb = br_handle_vlan(br, NULL, vg, skb);
--
2.35.1

View File

@ -7,15 +7,15 @@ set -o pipefail
builddir=./build
# OpenWrt: package hashes correspond to core repo version
OPENWRTREV="v21.02.1"
PACKAGEREV="ded142471e36831d2af63c7fe5062c4367f8ccd2"
ROUTINGREV="9e7698f20d1edf8f912fbce2f21400f3cc772b31"
OPENWRTREV="v21.02.2"
PACKAGEREV="b0ccc356900f6e1e1dc613d0ea980d5572f553dd"
ROUTINGREV="10d3ffd8b30186b49538167bac1fa1bf9c88f860"
# Gluon packages: master from 2020-02-04
GLUONREV="12e41d0ff07ec54bbd67a31ab50d12ca04f2238c"
OPENWRT_PKGS="gpioctl-sysfs libugpio fastd haserl micrond mtr bmon"
ROUTING_PKGS="kmod-batman-adv batctl alfred babeld"
ROUTING_PKGS="kmod-batman-adv batctl alfred babeld bird2"
GLUON_PKGS="simple-tc uradvd"
FFF_VARIANTS="node layer3"
@ -126,20 +126,9 @@ prepare() {
patch_target
# apply variant to ensure the included file "variant.mk"
# exists in builddir.
apply_variant
update_feeds
}
apply_variant() {
# set the variant for this build
export FFF_VARIANT=$(cat selected_variant)
# force the reevaluation of this Makefile to make note of the new variant
touch ./src/packages/fff/fff/Makefile
}
update_feeds() {
## generate own feeds.conf
#this local variable should be globally configure variable used in get_source and here
@ -174,8 +163,6 @@ update_feeds() {
}
prebuild() {
apply_variant
#create filesdir for our config
/bin/rm -rf "$builddir"/files
mkdir "$builddir"/files
@ -193,6 +180,9 @@ prebuild() {
version="$variant-$version"
fi
# select variant packages
echo "CONFIG_PACKAGE_fff-${variant}=y" >> "$builddir"/.config
{
echo "FIRMWARE_VERSION=\"$version\""
echo "VARIANT=\"$variant\""
@ -290,7 +280,13 @@ cp_firmware() {
filename_build=${f##*/}
filename_build=${filename_build//openwrt/fff-${version}}
filename_build=${filename_build//squashfs-/}
filename_build=${filename_build//${chipset}-${subtarget}-/}
# The x86 OpenWrt target does not have a device name,
# so keep the target and subtarget for identification.
if [ "$chipset" != "x86" ]; then
filename_build=${filename_build//${chipset}-/}
filename_build=${filename_build//${subtarget}-/}
fi
cp "$f" "$imagedestpath/$filename_build"
done
done
@ -316,8 +312,7 @@ buildrelease() {
fi
cd bin/$variant
for binary in *.bin *.img *.tar; do
md5sum "$binary" > ./"$binary".md5
for binary in *.bin *.img *.img.gz *.tar; do
sha256sum "$binary" > ./"$binary".sha256
done
echo -e "VERSION:$version" > release.nfo

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-alfred-monitoring-proxy
PKG_RELEASE:=5
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-alfred
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -0,0 +1,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-babel-bird2
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/fff-babel-bird2
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken babel-bird2
URL:=https://www.freifunk-franken.de
DEPENDS:=+bird2 +bird2c +owipcalc
PROVIDES:=fff-babel-implementation
endef
define Package/fff-babel-bird2/description
This is the Freifunk Franken Firmware babel-bird2 package.
endef
define Build/Compile
# nothing
endef
define Package/fff-babel-bird2/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-babel-bird2))

View File

@ -0,0 +1,123 @@
# router id is not required for babeld, but necessary for bird startup
router id 192.0.2.0;
ipv4 table fff4;
ipv6 sadr table fff6;
protocol device {
scan time 15;
}
# device routes for ipv4 peering address
protocol direct {
ipv4 {
table fff4;
import filter {
include "/tmp/bird/include/nat-filter.conf";
if (net ~ 10.50.0.0/16 || net ~ 10.83.0.0/16) && net.len = 32 then {
accept;
}
reject;
};
};
}
# device routes on loopback interface
protocol direct {
ipv4 {
table fff4;
import filter {
include "/tmp/bird/include/nat-filter.conf";
if net ~ 10.50.0.0/16 || net ~ 10.83.0.0/16 then {
accept;
}
reject;
};
};
ipv6 sadr {
table fff6;
import filter {
if net ~ fdff::/64 from ::/0 then {
reject;
}
# only import GUA + ULA addresses
if net !~ 2000::/3 from ::/0 || net !~ fc00::/7 from ::/0 then {
reject;
}
accept;
};
import keep filtered;
};
interface "lo";
}
# ipv6 kernel route interface
protocol kernel {
ipv6 sadr {
table fff6;
import filter {
# only import routes from kernel with proto static
if krt_source != 4 then {
reject;
}
if net ~ fdff::/64 from ::/0 then {
reject;
}
accept;
};
export all;
preference 200;
};
kernel table 10;
scan time 15;
learn yes;
}
# ipv4 kernel route interface
protocol kernel {
ipv4 {
table fff4;
import filter {
include "/tmp/bird/include/nat-filter.conf";
# only import routes from kernel with proto static
if krt_source = 4 then {
accept;
}
reject;
};
export all;
preference 200;
};
kernel table 10;
scan time 15;
learn yes;
}
protocol babel {
# required due to static configuration of global router id.
# also improves reconnect speed after restart.
randomize router id yes;
ipv4 {
table fff4;
import all;
export all;
};
ipv6 sadr {
table fff6;
import all;
export all;
};
include "/tmp/bird/include/babelpeers.conf";
};

View File

@ -0,0 +1,45 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2017 OpenWrt.org
USE_PROCD=1
START=70
BIRD_BIN="/usr/sbin/bird"
BIRD_CONF="/etc/bird.conf"
BIRD_PID_FILE="/var/run/bird.pid"
start_service() {
mkdir -p /var/run
set_include_path
procd_open_instance
procd_set_param command $BIRD_BIN -f -c $BIRD_CONF -P $BIRD_PID_FILE
procd_set_param file "$BIRD_CONF"
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
reload_service() {
set_include_path
procd_send_signal fff-bird
}
set_include_path() {
# Change include file path, so bird uses the correct configuration, depending on the configuration state:
# - If test mode is active (and /tmp/bird/fff exists), switch to the temporary configuration to be tested.
# - If new settings are applied or the old settings are restored after an unsuccessful test (and /tmp/bird/fff does not exist),
# switch back to the permanent configuration (/etc/bird/fff).
mkdir -p /tmp/bird/include
if [ -d /tmp/bird/fff ]; then
echo 'include "/tmp/bird/fff/babelpeers/*.conf";' > /tmp/bird/include/babelpeers.conf
echo 'include "/tmp/bird/fff/nat-filter.conf";' > /tmp/bird/include/nat-filter.conf
else
echo 'include "/etc/bird/fff/babelpeers/*.conf";' > /tmp/bird/include/babelpeers.conf
echo 'include "/etc/bird/fff/nat-filter.conf";' > /tmp/bird/include/nat-filter.conf
fi
}

View File

@ -0,0 +1,4 @@
/etc/init.d/bird disable
rm -f /etc/init.d/bird
exit 0

View File

@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-only
mv /etc/bird-fff.conf /etc/bird.conf
exit 0

View File

@ -0,0 +1,72 @@
# SPDX-License-Identifier: GPL-3.0-only
babel_get_version() {
/usr/sbin/bird --version 2>&1 | sed "s/BIRD version /bird-/"
}
babel_add_interface() {
[ "$#" -ne "4" ] && return 1
local name="$1"
local interface="$2"
local type="$3"
local rxcost="$4"
mkdir -p /tmp/bird/fff/babelpeers
echo "interface \"$interface\" { type $type; rxcost $rxcost; };" > /tmp/bird/fff/babelpeers/$name.conf
return 0
}
babel_delete_interface() {
[ "$#" -ne "1" ] && return 1
local name="$1"
# Removing peers from /etc is not necessary, as all peers are generated into /tmp on every configuration run,
# which completely overwrites existing peers in /etc in the apply step.
rm -f /tmp/bird/fff/babelpeers/$name.conf
return 0
}
babel_add_redistribute_filter() {
return 0
}
babel_add_private_prefix_filter() {
[ "$#" -ne "1" ] && return 1
local prefix="$1"
prefix=$(owipcalc "$prefix" network prefix "$prefix")
mkdir -p /tmp/bird/fff
echo "if net ~ $prefix then reject;" > /tmp/bird/fff/nat-filter.conf
return 0
}
babel_remove_custom_redistribute_filters() {
mkdir -p /tmp/bird/fff
> /tmp/bird/fff/nat-filter.conf
return 0
}
babel_apply_implementation() {
# error output hidden because apply might be executed without a preceding configure step.
if [ -d /tmp/bird/fff ]; then
rm -rf /etc/bird/fff
mv /tmp/bird/fff /etc/bird/fff
fi
return 0
}
babel_reload_implementation() {
/etc/init.d/fff-bird reload
}
babel_revert() {
rm -r /tmp/bird/fff
}

View File

@ -0,0 +1,20 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-only
set -e
set -o pipefail
if ! birdc show status >/dev/null 2>&1; then
# bird daemon not running or unavailable. exit.
exit 0
fi
neighbours="$(birdc -r show babel neighbors |
tail -n +5 |
awk '{ printf "<neighbour><ip>%s</ip><outgoing_interface>%s</outgoing_interface><link_cost>%s</link_cost></neighbour>", $1, $2, $3 }'
)"
echo -n "<babel_neighbours>$neighbours</babel_neighbours>"
exit 0

View File

@ -0,0 +1,28 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-babel
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/fff-babel
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken babel
URL:=https://www.freifunk-franken.de
DEPENDS:=+fff-babel-implementation
endef
define Package/fff-babel/description
This is the Freifunk Franken Firmware babel package.
endef
define Build/Compile
# nothing
endef
define Package/fff-babel/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-babel))

View File

@ -26,7 +26,7 @@ configure() {
fi
}
config_load babeld
config_load network
config_foreach remove_babelpeer interface
#add new peers
@ -75,14 +75,14 @@ configure() {
babel_add_peer6addr "network.$prefixname.ip6addr"
# add babel interface
babel_add_interface "$prefixname" "$iface" "$type" "$rxcost" || { echo "Could not add babeld interface for babelpeer $name"; exit 1; }
babel_add_interface "$prefixname" "$iface" "$type" "$rxcost" || { echo "Could not add babel interface for babelpeer $name"; exit 1; }
}
config_load gateway
config_foreach add_babelpeer babelpeer
# configure babeld filters for custom ipv6 addresses
# configure babel filters for custom ipv6 addresses
## remove old filters
babel_remove_custom_redistribute_filters
@ -90,14 +90,25 @@ configure() {
for prefix in $(uci -q get gateway.@client[0].ip6addr); do
babel_add_redistribute_filter "$prefix"
done
## add deny filters for client prefixes used with snat
if [ "$(uci -q get gateway.@client[0].snat)" = "1" ]; then
for prefix in $(uci -q get gateway.@client[0].ipaddr); do
babel_add_private_prefix_filter "$prefix"
done
fi
}
apply() {
uci commit network
uci commit babeld
babel_apply
}
reload() {
babel_reload
}
revert() {
uci revert network
uci revert babeld
babel_revert
}

View File

@ -1,3 +1,9 @@
implementation=$(uci -q get babelimpl.impl.impl)
[ -z "$implementation" ] && implementation=babeld
. /lib/functions/fff/babeldaemon/$implementation
babel_add_iifrules() {
[ "$#" -ne "1" ] && return 1
@ -38,10 +44,18 @@ babel_add_peeraddr() {
uci add_list "$option"="$peer_ip"
elif router_ip=$(uci -q get gateway.meta.router_ip); then
# use router_ip if no peer_ip is set
uci add_list "$option"="$router_ip"
ip=$router_ip
# use only first ip
ip=${ip%% *}
# remove CIDR mask
ip=${ip%%/*}
uci add_list "$option"="$ip"
elif ipaddr=$(uci -q get gateway.@client[0].ipaddr); then
# use client interface address (without subnet) if no router_ip is set
uci add_list "$option"=$(echo $ipaddr | cut -d / -f1)
uci add_list "$option"=${ipaddr%%/*}
else
echo "WARNING: No peer_ip, router_ip or client interface ipaddr set! IPv4 routing is not possible."
return 1
@ -64,61 +78,39 @@ babel_add_peer6addr() {
return 0
}
babel_add_interface() {
[ "$#" -ne "4" ] && return 1
babel_reload() {
# switch implementation temporarily
case $implementation in
bird2)
/etc/init.d/babeld stop 2>/dev/null
/etc/init.d/fff-bird start
;;
babeld)
/etc/init.d/fff-bird stop 2>/dev/null
/etc/init.d/babeld start
;;
esac
local name="$1"
local interface="$2"
local type="$3"
local rxcost="$4"
uci set babeld.$name=interface
uci set babeld.$name.ifname="$interface"
uci set babeld.$name.type="$type"
uci set babeld.$name.rxcost="$rxcost"
# call implementation-specific reload commands
babel_reload_implementation
return 0
}
babel_delete_interface() {
[ "$#" -ne "1" ] && return 1
babel_apply() {
# switch implementation persistently
case $implementation in
bird2)
/etc/init.d/babeld disable
/etc/init.d/fff-bird enable
;;
babeld)
/etc/init.d/fff-bird disable
/etc/init.d/babeld enable
;;
esac
local name="$1"
uci -q del babeld.$name
return 0
}
babel_add_redistribute_filter() {
[ "$#" -ne "1" ] && return 1
local prefix="$1"
config=$(uci add babeld filter)
uci set babeld.$config.type='redistribute'
uci set babeld.$config.ip="$prefix"
uci set babeld.$config.addedbyautoconfig='true'
return 0
}
babel_remove_custom_redistribute_filters() {
[ "$#" -ne "0" ] && return 1
remove_filters() {
local name="$1"
# check if filter was added by configuregateway
if ! [ "$(uci -q get babeld.$name.addedbyautoconfig)" = 'true' ]; then
return
fi
uci -q del babeld.$name
}
config_load babeld
config_foreach remove_filters filter
babel_apply_implementation
return 0
}

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-babeld
PKG_RELEASE:=8
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
@ -11,6 +11,7 @@ define Package/fff-babeld
TITLE:=Freifunk-Franken babeld configuration example
URL:=https://www.freifunk-franken.de
DEPENDS:=+babeld
PROVIDES:=fff-babel-implementation
endef
define Package/fff-babeld/description

View File

@ -0,0 +1,3 @@
/etc/init.d/babeld disable
exit 0

View File

@ -0,0 +1,103 @@
# SPDX-License-Identifier: GPL-3.0-only
babel_get_version() {
/usr/sbin/babeld -V 2>&1
}
babel_add_interface() {
[ "$#" -ne "4" ] && return 1
local name="$1"
local interface="$2"
local type="$3"
local rxcost="$4"
uci set babeld.$name=interface
uci set babeld.$name.ifname="$interface"
uci set babeld.$name.type="$type"
uci set babeld.$name.rxcost="$rxcost"
return 0
}
babel_delete_interface() {
[ "$#" -ne "1" ] && return 1
local name="$1"
uci -q del babeld.$name
return 0
}
babel_add_redistribute_filter() {
[ "$#" -ne "1" ] && return 1
local prefix="$1"
config=$(uci add babeld filter)
uci set babeld.$config.type='redistribute'
uci set babeld.$config.ip="$prefix"
uci set babeld.$config.addedbyautoconfig='true'
return 0
}
babel_add_private_prefix_filter() {
[ "$#" -ne "1" ] && return 1
local prefix="$1"
config=$(uci add babeld filter)
uci set babeld.$config.type='redistribute'
uci set babeld.$config.ip="$prefix"
uci set babeld.$config.addedbyautoconfig='true'
uci set babeld.$config.action='deny'
# move to top, so filter rule has precedence over all other rules
uci reorder babeld.$config=0
config=$(uci add babeld filter)
uci set babeld.$config.type='redistribute'
uci set babeld.$config.ip="$prefix"
uci set babeld.$config.addedbyautoconfig='true'
uci set babeld.$config.local='true'
uci set babeld.$config.action='deny'
# move to top, so filter rule has precedence over all other rules
uci reorder babeld.$config=0
return 0
}
babel_remove_custom_redistribute_filters() {
[ "$#" -ne "0" ] && return 1
remove_filters() {
local name="$1"
# check if filter was added by configuregateway
if ! [ "$(uci -q get babeld.$name.addedbyautoconfig)" = 'true' ]; then
return
fi
uci -q del babeld.$name
}
config_load babeld
config_foreach remove_filters filter
return 0
}
babel_apply_implementation() {
uci commit babeld
}
babel_reload_implementation() {
return 0
}
babel_revert() {
uci revert babeld
}

View File

@ -0,0 +1,34 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-base
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
define Package/fff-base
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken base dependencies
URL:=https://www.freifunk-franken.de
DEFAULT:=y
DEPENDS:= \
+iptables \
+ip6tables \
+micrond \
+odhcp6c \
+fff-config \
+fff-network \
+fff-nodewatcher \
+fff-simple-tc \
+fff-support \
+fff-sysupgrade \
+fff-timeserver \
+fff-web-ui \
+fff-wireless
endef
define Package/fff-variant/description
This package includes base packages used in the Freifunk-Franken firmware
endef
$(eval $(call BuildPackage,fff-base))

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-batman-adv
PKG_RELEASE:=4
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-boardname
PKG_RELEASE:=8
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,5 +1,9 @@
BOARD=$(cat /var/sysinfo/board_name)
if uname -a | grep x86_64 > /dev/null; then
BOARD="x86_64"
fi
uci set board.model.name=$BOARD
uci commit board

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-config
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -0,0 +1 @@
vm.panic_on_oom=1

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-dhcp
PKG_RELEASE:=6
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,3 +1,10 @@
# Use a larger cachesize by default
cachesize=1024
# Increase cachesize for systems with enough memory
mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)"
[ "$mem" -gt 65536 ] && cachesize=8192
uci batch >/dev/null <<EOF
delete dhcp.@dnsmasq[0]
delete dhcp.lan
@ -12,6 +19,7 @@ uci batch >/dev/null <<EOF
set dhcp.@dnsmasq[-1].domain='fff.community'
set dhcp.@dnsmasq[-1].expandhosts='0'
set dhcp.@dnsmasq[-1].nonegcache='0'
set dhcp.@dnsmasq[-1].cachesize="$cachesize"
set dhcp.@dnsmasq[-1].authoritative='1'
set dhcp.@dnsmasq[-1].readethers='1'
set dhcp.@dnsmasq[-1].leasefile='/tmp/dhcp.leases'

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-fastd
PKG_RELEASE:=3
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -29,6 +29,7 @@ ln -s /tmp/fastd_fff_peers /etc/fastd/fff/peers
echo "#!/bin/sh" > /etc/fastd/fff/up.sh
echo "ip link set up dev fffVPN" >> /etc/fastd/fff/up.sh
echo "batctl if add fffVPN" >> /etc/fastd/fff/up.sh
echo "batctl hardif fffVPN hop_penalty 30" >> /etc/fastd/fff/up.sh
chmod +x /etc/fastd/fff/up.sh
exit 0

View File

@ -0,0 +1,29 @@
protocol=fastd
fastd_clear() {
rm /tmp/fastd_fff_peers/* 2>/dev/null
}
fastd_addpeer() {
[ -d /tmp/fastd_fff_peers ] || mkdir /tmp/fastd_fff_peers
# write fastd-config
json_get_var servername name
filename="/etc/fastd/fff/peers/$servername"
echo "#name \"${servername}\";" > "$filename"
json_get_var key key
echo "key \"${key}\";" >> "$filename"
json_get_var address address
json_get_var port port
echo "remote \"${address}\" port ${port};" >> "$filename"
echo "" >> "$filename"
echo "float yes;" >> "$filename"
}
fastd_start_stop() {
if ls /etc/fastd/fff/peers/* &>/dev/null; then
/etc/init.d/fastd reload
else
/etc/init.d/fastd stop
fi
}

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-firewall
PKG_RELEASE:=8
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,2 +0,0 @@
#solves MTU problem with bad ISPs
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

View File

@ -1,5 +0,0 @@
# Limit ssh to 6 new connections per 60 seconds
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --set --name dropbear
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 6 --rttl --name dropbear -j DROP
/usr/sbin/iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --set --name dropbear
/usr/sbin/iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 6 --rttl --name dropbear -j DROP

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-hoods
PKG_RELEASE:=19
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-hoodutils
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-layer3-config
PKG_RELEASE:=9
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,6 +1,6 @@
configure() {
# check if gateway config exists
if ! uci -q show gateway > /dev/null; then
if ! uci show gateway > /dev/null; then
echo "ERROR: Gateway config could not be parsed or does not exist."
return 1

View File

@ -20,7 +20,7 @@ configure() {
# ip6addr
#remove old ip6addr
for ip in $(uci get network.client.ip6addr); do
for ip in $(uci -q get network.client.ip6addr); do
if echo "$ip" | grep -v -e "fdff:" -e "fe80::1/64" > /dev/null; then
uci del_list network.client.ip6addr="$ip"
fi
@ -50,11 +50,10 @@ configure() {
# set interface
#remove all eth interfaces
ifaces=$(uci get network.client.ifname | sed 's/\beth[^ ]* *//g' | sed 's/\bswitch[^ ]* *//g')
if vlan=$(uci -q get gateway.@client[0].vlan); then
uci set network.client.ifname="${SWITCHDEV}.$vlan $ifaces"
uci set network.client.ifname="${SWITCHDEV}.$vlan"
elif iface=$(uci -q get gateway.@client[0].iface); then
uci set network.client.ifname="$iface $ifaces"
uci set network.client.ifname="$iface"
else
echo "WARNING: No Interface for client specified"
fi

View File

@ -0,0 +1,31 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-layer3-snat
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
define Package/fff-layer3-snat
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken layer3 configuration with SNAT
URL:=https://www.freifunk-franken.de
DEPENDS:= \
+fff-firewall \
+fff-layer3-config \
+kmod-ipt-nat
endef
define Package/fff-layer3-snat/description
With this package it is possible to make SNAT with IPv4 on the router
endef
define Build/Compile
# nothing
endef
define Package/fff-layer3-snat/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-layer3-snat))

View File

@ -0,0 +1,34 @@
configure() {
# first we delete the snat config
uci -q del network.client.fff_snat
uci -q del network.client.fff_snat_sourceip
if [ "$(uci -q get gateway.@client[0].snat)" = '1' ]; then
# first check the config is plausible
if ! routerip=$(uci -q get gateway.meta.router_ip); then
echo "ERROR: No router_ip set, which is required for SNAT!"
return 1
fi
if ! uci -q get gateway.@client[0].ipaddr >/dev/null; then
echo "ERROR: No ipaddr set, which is required for SNAT!"
return 1
fi
# keep only the first IP
routerip=${routerip%% *}
# keep only the IP without the CIDR
routerip=${routerip%%/*}
# We set the snat config
uci set network.client.fff_snat=1
uci set network.client.fff_snat_sourceip=$routerip
fi
}
apply() {
uci commit network
}
revert() {
uci revert network
}

View File

@ -0,0 +1,4 @@
if [ "$(uci -q get network.client.fff_snat)" = '1' ]; then
iptables -t mangle -A PREROUTING -i br-client -j MARK --set-mark 0x736e6174
iptables -t nat -A POSTROUTING -m mark --mark 0x736e6174 -j SNAT --to-source $(uci -q get network.client.fff_snat_sourceip)
fi

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-layer3
PKG_RELEASE:=9
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
@ -11,10 +11,13 @@ define Package/fff-layer3
TITLE:=Freifunk-Franken gateway configuration
URL:=https://www.freifunk-franken.de
DEPENDS:=+fff-alfred-monitoring-proxy \
+fff-babel \
+fff-babeld \
+fff-babel-bird2 \
+fff-boardname \
+fff-dhcp \
+fff-layer3-config \
+fff-layer3-snat \
+fff-mqtt-monitoring \
+fff-network \
+fff-ra \
@ -36,6 +39,7 @@ define Package/fff-layer3
+iptables-mod-ipopt \
+iptables-mod-conntrack-extra \
+mtr \
+snmp-utils \
+tc \
+tcpdump \
+vxlan

View File

@ -0,0 +1,19 @@
#!/bin/sh
ipv4dest=$(uci -q get fff.latency.ipv4)
ipv6dest=$(uci -q get fff.latency.ipv6)
if [ -n "$ipv4dest" ] || [ -n "$ipv6dest" ] ; then
printf "<latency>"
if [ -n "$ipv4dest" ] ; then
ipv4latency=$(ping -qc3 -4 $ipv4dest 2>&1 | awk -F'/' 'END{ print (/^round-trip/? $4:"0") }')
printf "<ipv4latency>$ipv4latency</ipv4latency><ipv4dest>$ipv4dest</ipv4dest>"
fi
if [ -n "$ipv6dest" ] ; then
ipv6latency=$(ping -qc3 -6 $ipv6dest 2>&1 | awk -F'/' 'END{ print (/^round-trip/? $4:"0") }')
printf "<ipv6latency>$ipv6latency</ipv6latency><ipv6dest>$ipv6dest</ipv6dest>"
fi
printf "</latency>"
fi
exit 0

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-mqtt-monitoring
PKG_RELEASE:=1
PKG_RELEASE:=$(COMMITCOUNT)
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-mqtt-monitoring

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-mqtt
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-mqtt
@ -14,8 +14,8 @@ define Package/fff-mqtt
URL:=https://www.freifunk-franken.de
DEPENDS:= \
+fff-config \
+libmosquitto-ssl \
+mosquitto-client-ssl
+libmosquitto-nossl \
+mosquitto-client-nossl
endef
define Package/fff-mqtt/description

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
PKG_RELEASE:=50
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,30 +0,0 @@
config globals 'globals'
option packet_steering '1'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'client'
option type 'bridge'
option auto '1'
config interface 'wan'
option proto 'none'
option ifname 'eth2'
config interface 'wan4'
option proto 'dhcp'
option ifname '@wan'
config interface 'wan6'
option proto 'dhcpv6'
option reqprefix 'no'
option sourcefilter '0'
option ifname '@wan'
config interface 'ethmesh'
option proto 'batadv_hardif'
option master 'bat0'

View File

@ -0,0 +1,12 @@
# The GL-AR150 was converted from ONEPORT to TWOPORT.
# Copy ETHMODE to LAN1MODE ("LAN"-Port) and set LAN0MODE ("WAN"-Port) to WAN to retain the configured behaviour for upgraded devices.
if [ -s /etc/network.config ] ; then
. /etc/network.config
# Ensure ETHMODE contains a sensible value. Use default behaviour (CLIENT) otherwise.
[ "$ETHMODE" != "BATMAN" ] && [ "$ETHMODE" != "CLIENT" ] && [ "$ETHMODE" != "WAN" ] && ETHMODE="CLIENT"
echo "LAN0MODE='WAN' # use BATMAN, CLIENT or WAN" > /etc/network.config
echo "LAN1MODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
echo "FORCEPARSE='2' # Parse at: 0=first boot only, 1=every reboot, 2=next reboot (once)" >> /etc/network.config
fi

View File

@ -0,0 +1,141 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
. /lib/functions/system.sh
. /lib/functions/fff/network
BOARD="$(uci get board.model.name)"
. /etc/network.$BOARD
[ -n "$ROUTERMAC" ] || ROUTERMAC=$(get_mac_label)
# Clear possibly existing network configuration
> /etc/config/network
# Add basic network configuration
uci batch <<-__EOF__
set network.loopback='interface'
set network.loopback.ifname='lo'
set network.loopback.proto='static'
set network.loopback.ipaddr='127.0.0.1'
set network.loopback.netmask='255.0.0.0'
set network.client='interface'
set network.client.type='bridge'
set network.client.auto='1'
set network.wan='interface'
set network.wan.proto='none'
set network.wan.ifname="$WANDEV"
set network.wan4='interface'
set network.wan4.proto='dhcp'
set network.wan4.ifname='@wan'
set network.wan6='interface'
set network.wan6.proto='dhcpv6'
set network.wan6.reqprefix='no'
set network.wan6.sourcefilter='0'
set network.wan6.ifname='@wan'
set network.ethmesh='interface'
set network.ethmesh.proto='batadv_hardif'
set network.ethmesh.master='bat0'
__EOF__
SWITCHHW=$(swconfig list | awk '{ print $4 }')
if [ "$DSA" = "1" ]; then
uci batch <<-__EOF__
set network.$SWITCHDEV=device
set network.$SWITCHDEV.name=$SWITCHDEV
set network.$SWITCHDEV.type=bridge
# temporary workaround for netifd bug present in OpenWrt 21.02.0 (FS#4104)
set network.$SWITCHDEV.bridge_empty='1'
set network.${SWITCHDEV}_1=bridge-vlan
set network.${SWITCHDEV}_1.device=$SWITCHDEV
set network.${SWITCHDEV}_1.vlan=1
set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
set network.${SWITCHDEV}_3=bridge-vlan
set network.${SWITCHDEV}_3.device=$SWITCHDEV
set network.${SWITCHDEV}_3.vlan=3
set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
__EOF__
if [ "$WANDEV" = "$SWITCHDEV" ] || ! [ -z "$WAN_PORTS" ]; then
uci batch <<-__EOF__
set network.${SWITCHDEV}_2=bridge-vlan
set network.${SWITCHDEV}_2.device=$SWITCHDEV
set network.${SWITCHDEV}_2.vlan=2
set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
__EOF__
fi
elif [ -n "$SWITCHHW" ] && [ -z "$ONE_PORT" ] && [ -z "$TWO_PORT" ]; then
uci batch <<-__EOF__
set network.$SWITCHDEV=switch
set network.$SWITCHDEV.name=$SWITCHHW
set network.$SWITCHDEV.enable=1
set network.$SWITCHDEV.reset=1
set network.$SWITCHDEV.enable_vlan=1
set network.${SWITCHDEV}_1=switch_vlan
set network.${SWITCHDEV}_1.device=$SWITCHHW
set network.${SWITCHDEV}_1.vlan=1
set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
set network.${SWITCHDEV}_3=switch_vlan
set network.${SWITCHDEV}_3.device=$SWITCHHW
set network.${SWITCHDEV}_3.vlan=3
set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
__EOF__
if [ "$WANDEV" = "$SWITCHDEV" ] || [ -n "$WAN_PORTS" ]; then
uci batch <<-__EOF__
set network.${SWITCHDEV}_2=switch_vlan
set network.${SWITCHDEV}_2.device=$SWITCHHW
set network.${SWITCHDEV}_2.vlan=2
set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
__EOF__
fi
fi
if [ -n "$SWITCHHW" ] || [ "$DSA" = "1" ]; then
uci set network.client.ifname="$SWITCHDEV.1 bat0"
uci set network.ethmesh.ifname="$SWITCHDEV.3"
if [ "$WANDEV" = "$SWITCHDEV" ]; then
uci set network.wan.ifname=$WANDEV.2
fi
fi
if [ -n "$ETHMESHMAC" ]; then
uci set network.ethmesh.macaddr=$ETHMESHMAC
fi
if [ -n "$ROUTERMAC" ]; then
uci set network.client.macaddr=$ROUTERMAC
fi
prefix="fdff::/64"
# Set $prefix::1 as IP
addr1=$(owipcalc "$prefix" add ::1)
# Set $prefix::MAC as IP
addr2=$(owipcalc "$prefix" add "::$(ipMacSuffix "$ROUTERMAC")")
# Set $prefix::EUI64 as IP
addr3=$(owipcalc "$prefix" add "::$(ipEUISuffix "$ROUTERMAC")")
uci batch <<-__EOF__
del network.globals
set network.globals=globals
set network.globals.ula_prefix=$prefix
add_list network.client.ip6addr=$addr1
add_list network.client.ip6addr=$addr2
add_list network.client.ip6addr=$addr3
set network.client.proto=static
__EOF__
uci -q commit network

View File

@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
# Enable RPS
uci batch <<-__EOF__
set network.globals=globals
set network.globals.packet_steering='1'
__EOF__
uci -q commit network

View File

@ -24,6 +24,7 @@ get_cpu_port() {
ubnt,nanostation-loco-m-xw|\
ubnt,unifi|\
ubnt,unifiac-mesh|\
x86_64|\
xiaomi,mi-router-4a-gigabit)
CPUPORT=""
;;

View File

@ -6,13 +6,12 @@
BOARD="$(uci get board.model.name)"
. /etc/network.$BOARD
[ -n "$ROUTERMAC" ] || ROUTERMAC=$(get_mac_label)
if [ -s /etc/network.config ] ; then
. /etc/network.config
else
# Write network.config
if [ "$ONE_PORT" = "YES" ] || [ -n "$ETHPORT" ] ; then
if [ "$ONE_PORT" = "YES" ] ; then
echo "ETHMODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
fi
if [ -n "$TWO_PORT" ] ; then
@ -105,109 +104,6 @@ elif [ "$TWO_PORT" = "YES" ]; then
uci commit network
fi
else
if ! uci -q get network.$SWITCHDEV > /dev/null ; then
if [ "$DSA" = "1" ]; then
uci set network.$SWITCHDEV=device
uci set network.$SWITCHDEV.name=$SWITCHDEV
uci set network.$SWITCHDEV.type=bridge
# temporary workaround for netifd bug present in OpenWrt 21.02.0 (FS#4104)
uci set network.$SWITCHDEV.bridge_empty='1'
uci set network.${SWITCHDEV}_1=bridge-vlan
uci set network.${SWITCHDEV}_1.device=$SWITCHDEV
uci set network.${SWITCHDEV}_1.vlan=1
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
if [ "$WANDEV" = "$SWITCHDEV" ] || ! [ -z "$WAN_PORTS" ]; then
uci set network.${SWITCHDEV}_2=bridge-vlan
uci set network.${SWITCHDEV}_2.device=$SWITCHDEV
uci set network.${SWITCHDEV}_2.vlan=2
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
fi
uci set network.${SWITCHDEV}_3=bridge-vlan
uci set network.${SWITCHDEV}_3.device=$SWITCHDEV
uci set network.${SWITCHDEV}_3.vlan=3
uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
else
SWITCHHW=$(swconfig list | awk '{ print $4 }')
uci set network.$SWITCHDEV=switch
uci set network.$SWITCHDEV.name=$SWITCHHW
uci set network.$SWITCHDEV.enable=1
uci set network.$SWITCHDEV.reset=1
uci set network.$SWITCHDEV.enable_vlan=1
uci set network.${SWITCHDEV}_1=switch_vlan
uci set network.${SWITCHDEV}_1.device=$SWITCHHW
uci set network.${SWITCHDEV}_1.vlan=1
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
if [ "$WANDEV" = "$SWITCHDEV" ] || [ -n "$WAN_PORTS" ]; then
uci set network.${SWITCHDEV}_2=switch_vlan
uci set network.${SWITCHDEV}_2.device=$SWITCHHW
uci set network.${SWITCHDEV}_2.vlan=2
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
fi
uci set network.${SWITCHDEV}_3=switch_vlan
uci set network.${SWITCHDEV}_3.device=$SWITCHHW
uci set network.${SWITCHDEV}_3.vlan=3
uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
fi
uci set network.client.ifname="$SWITCHDEV.1 bat0"
uci set network.ethmesh.ifname="$SWITCHDEV.3"
if [ "$WANDEV" = "$SWITCHDEV" ]; then
uci set network.wan.ifname=$WANDEV.2
else
uci set network.wan.ifname=$WANDEV
fi
uci commit network
fi
fi
/etc/init.d/network restart
if [ -n "$ETHMESHMAC" ]; then
if uci get network.ethmesh.macaddr
then
echo "MAC for ethmesh is set already"
else
echo "Fixing MAC on $SWITCHDEV.3 (ethmesh)"
sleep 10
uci set network.ethmesh.macaddr=$ETHMESHMAC
uci commit network
ifconfig $SWITCHDEV.3 down
ifconfig $SWITCHDEV.3 hw ether $ETHMESHMAC
ifconfig $SWITCHDEV.3 up
/etc/init.d/network restart
fi
fi
if [ -n "$ROUTERMAC" ]; then
if uci get network.client.macaddr
then
echo "MAC for client is set already"
else
echo "Fixing MAC on br-client"
sleep 10
uci set network.client.macaddr=$ROUTERMAC
uci commit network
ifconfig br-client down
ifconfig br-client hw ether $ROUTERMAC
ifconfig br-client up
/etc/init.d/network restart
fi
fi
if [ -n "$ETH0MAC" ]; then
@ -216,44 +112,6 @@ if [ -n "$ETH0MAC" ]; then
NEW_MACADDR=$(cat "/sys/class/net/${ETH0MAC}/address")
uci set network.$ETH0DEV.macaddr=$NEW_MACADDR
uci commit network
ifconfig $ETH0DEV down
ifconfig $ETH0DEV hw ether $NEW_MACADDR
ifconfig $ETH0DEV up
/etc/init.d/network restart
fi
if uci -q get "network.client.ip6addr" > /dev/null
then
echo "IPv6 for client is set already"
else
echo "Setting IPv6 addresses"
# Some time needed :(
sleep 5
for ip in $(ip -6 addr show br-client | awk '/fdff/{ print $2 }'); do
ip -6 addr del $ip dev br-client
done
prefix="fdff::/64"
# Set $prefix::MAC as IP
addr=$(owipcalc "$prefix" add "::$(ipMacSuffix "$ROUTERMAC")")
ip -6 addr add $addr dev br-client
uci -q set network.globals.ula_prefix=$prefix
uci -q add_list network.client.ip6addr=$addr
uci -q set network.client.proto=static
# Set $prefix::1 as IP
addr=$(owipcalc "$prefix" add ::1)
ip -6 addr add $addr dev br-client
uci -q add_list network.client.ip6addr=$addr
# Set $prefix::link-local as IP
addr=$(owipcalc "$prefix" add "::$(ipEUISuffix "$ROUTERMAC")")
ip -6 addr add $addr dev br-client
uci -q add_list network.client.ip6addr=$addr
uci -q commit network
[ -s /etc/init.d/fff-uradvd ] && /etc/init.d/fff-uradvd restart
fi
reload_config

View File

@ -2,12 +2,8 @@
WANDEV=eth1
SWITCHDEV=eth0
WAN_PORTS=
BATMAN_PORTS="0t"
CLIENT_PORTS="0t"
TWO_PORT=YES
ETHMESHMAC="$(macFlipLocalBit $(cat /sys/class/net/eth0/address))"
. /etc/network.mode
ETHPORT=1

View File

@ -0,0 +1 @@
ETHMODE="CLIENT"

View File

@ -0,0 +1,7 @@
WANDEV=eth0
SWITCHDEV=eth0
ONE_PORT="YES"
. /etc/network.mode
ROUTERMAC=$(cat /sys/class/net/eth0/address)

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-node
PKG_RELEASE:=3
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
@ -12,6 +12,7 @@ define Package/fff-node
URL:=https://www.freifunk-franken.de
DEPENDS:=+fff-batman-adv \
+fff-fastd \
+fff-vxlan-node-vpn \
+fff-firewall \
+fff-hoods \
+fff-uradvd

View File

@ -74,8 +74,12 @@ if [ -x /usr/bin/fastd ]; then
SYSTEM_DATA="$SYSTEM_DATA<fastd_version>$(/usr/bin/fastd -v | awk '{ print $2 }')</fastd_version>"
fi
if [ -x /usr/sbin/babeld ]; then
SYSTEM_DATA="$SYSTEM_DATA<babel_version>$(/usr/sbin/babeld -V 2>&1)</babel_version>"
if [ -e /lib/functions/fff/babel ]; then
. /lib/functions/fff/babel
babel_version=$(babel_get_version)
if [ $? -eq 0 ]; then
SYSTEM_DATA="$SYSTEM_DATA<babel_version>$babel_version</babel_version>"
fi
fi
# example for /etc/openwrt_release:
@ -112,6 +116,7 @@ fi
# Checks if fastd is running
vpn_active=0
pidof fastd >/dev/null && vpn_active=1
bridge fdb show brport vxlan0 state permanent &>/dev/null && vpn_active=1
SYSTEM_DATA="$SYSTEM_DATA<vpn_active>$vpn_active</vpn_active>"
echo -n "<system_data>$SYSTEM_DATA</system_data>"

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-ra
PKG_RELEASE:=3
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -4,6 +4,13 @@ uci batch <<EOF
set dhcp.client.ra='server'
set dhcp.client.ra_default='2'
set dhcp.client.ra_management='0'
set dhcp.client.ra_useleasetime='1'
# Work around unexpected behavior of odhcpd (see #238).
#
# This value has to be less then or equal to
# dhcp.client.leasetime (set in fff-dhcp).
set dhcp.client.preferred_lifetime='1h'
EOF
exit 0

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-random
PKG_RELEASE:=3
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-simple-tc
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-support
PKG_RELEASE:=9
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -221,7 +221,7 @@ if swconfig list | grep -q switch0 ; then
done
else
echo "-> PORT ASSIGNMENT"
if grep -q "ONE_PORT" "/etc/network.$board_name" || grep -q "ETHPORT" "/etc/network.$board_name" ; then
if grep -q "ONE_PORT" "/etc/network.$board_name" ; then
# Device has a port set by $ETHMODE
. /etc/network.mode
. /etc/network.config

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-sysupgrade
PKG_RELEASE:=13
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-timeserver
PKG_RELEASE:=3
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-uradvd
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -11,10 +11,16 @@ URADVD_BIN=/usr/sbin/uradvd
service_triggers()
{
procd_add_reload_trigger "fff-uradvd"
procd_add_reload_trigger "fff-uradvd" "network"
}
start_service() {
procd_open_instance
procd_set_param command "$URADVD_BIN" -i br-client -p $(uci get network.globals.ula_prefix)
}
reload_service()
{
stop
start
}

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-vpn-select
PKG_RELEASE:=5
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,65 +1,47 @@
#!/bin/sh
# Usage: vpn-select <path-to-hood-file>
# To add a new protocol, put a file with three functions to /usr/lib/vpn-select.d/ .
# The file must start with protocol=name. It is most important to use the same name here and in hoodfile.
# The old config can be cleared in function ${protocol}_clear(). It is called first once per installed protocol.
# The function ${protocol}_addpeer() is called for every selected peer in hoodfile.
# The function ${protocol}_start_stop() is called at the end once per installed protocol.
. /usr/share/libubox/jshn.sh
hoodfile="$1"
make_config() {
# remove old config
rm /tmp/fastd_fff_peers/*
# source functions
for file in /usr/lib/vpn-select.d/*; do
[ -f $file ] && . "$file"
supported_protocols="$supported_protocols $protocol"
done
# prepare
Index=1
json_load "$(cat "$hoodfile")"
json_select vpn
# clear old config
for protocol in $supported_protocols; do
"${protocol}_clear"
done
# get fastd peers
while json_select "$Index" > /dev/null
do
json_get_var protocol protocol
if [ "$protocol" = "fastd" ]; then
# set up fastd
json_get_var servername name
filename="/etc/fastd/fff/peers/$servername"
echo "#name \"${servername}\";" > "$filename"
json_get_var key key
echo "key \"${key}\";" >> "$filename"
json_get_var address address
json_get_var port port
echo "remote \"${address}\" port ${port};" >> "$filename"
echo "" >> "$filename"
echo "float yes;" >> "$filename"
fi
json_select ".." # back to vpn
Index=$(( Index + 1 ))
done
json_select ".." # back to root
}
# configure vpn
# Only do something if file is there and not empty; otherwise exit 1
if [ -s "$hoodfile" ]; then
if [ ! -d /tmp/fastd_fff_peers ]; then
# first run after reboot
mkdir /tmp/fastd_fff_peers
make_config
# start fastd only if there are some peers
[ "$(ls /etc/fastd/fff/peers/* 2>/dev/null)" ] && /etc/init.d/fastd start
else
make_config
/etc/init.d/fastd reload
# fastd start/stop for various situations
pidfile="/tmp/run/fastd.fff.pid"
if [ "$(ls /etc/fastd/fff/peers/* 2>/dev/null)" ]; then
([ -s "$pidfile" ] && [ -d "/proc/$(cat "$pidfile")" ]) || /etc/init.d/fastd start
else
([ -s "$pidfile" ] && [ -d "/proc/$(cat "$pidfile")" ]) && /etc/init.d/fastd stop
fi
if [ "$0" != "/usr/sbin/vpn-stop" ] ; then
if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
json_load "$(cat "$hoodfile")"
json_select hood
json_get_var id id
json_select ".."
json_select vpn
json_get_keys vpn_keys
for key in $vpn_keys; do
json_select $key
json_get_var protocol protocol
"${protocol}_addpeer"
json_select ".." # back to vpn
done
fi
exit 0
else
echo "vpn-select: Hood file not found or empty!"
exit 1
fi
# start/restart/stop vpnservices
for protocol in $supported_protocols; do
"${protocol}_start_stop"
done

View File

@ -1,5 +0,0 @@
#!/bin/sh
rm /tmp/fastd_fff_peers/*
/etc/init.d/fastd stop

View File

@ -0,0 +1 @@
vpn-select

View File

@ -0,0 +1,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-vxlan-node-vpn
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken vxlan-node
URL:=http://www.freifunk-franken.de
DEPENDS:=+vxlan
endef
define Package/$(PKG_NAME)/description
This is the vxlan-node-vpn package for the Freifunk Franken Firmware
This will configure and set up the VPN via vxlan
endef
define Build/Compile
# nothing
endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,18 @@
uci batch <<EOF
set network.vxlan0=interface
set network.vxlan0.proto=vxlan6
set network.vxlan0.port=8472
set network.vxlan0.ip6addr=auto
set network.vxlan0.srcportmin=8472
set network.vxlan0.srcportmax=8473
set network.vxlan0.ageing=30
set network.vxlan0.mtu=1422
set network.vxlan0.vid=0
set network.vxlan0.disabled=1
set network.vxbat=interface
set network.vxbat.proto=batadv_hardif
set network.vxbat.master=bat0
set network.vxbat.ifname=vxlan0
set network.vxbat.disabled=1
EOF

View File

@ -0,0 +1,24 @@
protocol=vxlan
vxlan_clear() {
while uci -q delete network.@vxlan_peer[0]; do :; done
uci set network.vxlan0.vid="0"
uci set network.vxlan0.disabled="1"
uci set network.vxbat.disabled="1"
}
vxlan_addpeer() {
json_get_var address address
address=$(ping6 -w1 -c1 "$address" | awk '/from/ {print substr($4, 1, length($4)-1); exit}')
[ -z $address ] && return ## address not reachable
uci set network.vxlan0.vid="$id"
uci set network.vxlan0.disabled="0"
uci set network.vxbat.disabled="0"
uci add network vxlan_peer
uci set network.@vxlan_peer[-1].vxlan="vxlan0"
uci set network.@vxlan_peer[-1].dst="$address"
}
vxlan_start_stop() {
reload_config
}

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-web-hood
PKG_RELEASE:=2
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-web-mqtt
PKG_RELEASE:=1
PKG_RELEASE:=$(COMMITCOUNT)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-web-ui
PKG_RELEASE:=18
PKG_RELEASE:=$(shell echo -n $$(( $(COMMITCOUNT) + 20 )))
include $(INCLUDE_DIR)/package.mk

View File

@ -59,15 +59,74 @@ fi
<tr><th>Name:</th><td><%= ${HOSTNAME} %></td></tr>
<tr><th>Modell:</th><td><% cat /tmp/sysinfo/model 2>/dev/null %></td></tr>
<tr><th>MAC-Adresse:</th><td><%= $(cat /sys/class/net/br-client/address) %></td></tr>
<tr><th>Bekannte Knoten:</th><td><%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %></td></tr>
<tr><th>Nachbarknoten:</th><td><%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %></td></tr>
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
<tr><th>Laufzeit:</th><td><%= ${uptime} %></td></tr>
<tr><th>Auslastung:</th><td><%= ${load} %></td></tr>
<tr><th>Uhrzeit:</th><td><% date %></td></tr>
</table>
</fieldset>
<fieldset style="padding-bottom:12px">
<legend>VPN</legend>
<table>
<% if [ -f "$(command -v fastd)" ] ; then %>
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
<% fi %>
<% if [ -f "$(command -v wg)" ] ; then %>
<tr><td>
<table border="1">
<tr><th style="text-align:center">Interfacename</th><th style="text-align:center">Endpoint</th><th style="text-align:center">Handshake</th><th style="text-align:center">Daten</th></tr>
<% for f in $(wg | grep interface | cut -d ":" -f 2 | sed 's/^ //'); do
endpoint="$(wg show $f | grep endpoint)"
handshake="$(wg show $f | grep handshake)"
transfer="$(wg show $f | grep transfer)"
echo "<tr><td style="text-align:center">"$f"</td>"
echo "<td style="text-align:center">"${endpoint#*:}"</td>"
echo "<td style="text-align:center">"${handshake#*:}"</td>"
echo "<td style="text-align:center">"${transfer#*:}"</td>"
done %>
</table>
</td></tr>
<% fi %>
</table>
</fieldset>
<fieldset style="padding-bottom:12px">
<legend>Routing</legend>
<table>
<% if [ -f "$(command -v batctl)" ] ; then %>
<tr><th>Bekannte Knoten:</th><td><%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %></td></tr>
<tr><th>Nachbarknoten:</th><td><%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %></td></tr>
<% fi %>
<% if birdc show status >/dev/null 2>&1 || pgrep babeld >/dev/null; then %>
<tr><td><table border="1">
<tr><th style="text-align:center">IP</th><th style="text-align:center">Interface</th><th style="text-align:center">Kosten</th></tr>
<% if birdc show status >/dev/null 2>&1; then
neighbours="$(birdc -r show babel neighbors | tail -n +5 | awk '{ printf "<tr><td>%s</td><td>%s</td><td>%s</td></tr>", $1, $2, $3 }')"
fi
if
pgrep babeld >/dev/null; then
lockfile="/tmp/fff-web-ui.babel.lock"
if [ -e $lockfile ] && [ 30 -gt $(( $(date +%s) - $(date -r $lockfile +%s) )) ] ; then
neighbours=$(cat /tmp/fff-web-ui.babel)
else
neighbours="$(echo dump | nc ::1 33123 | grep '^add neighbour' |
awk '{
for (i=2; i < NF; i += 2) {
vars[$i] = $(i+1)
}
}
{
printf "<tr><td style="text-align:center">%s</td><td style="text-align:center">%s</td><td style="text-align:center">%s</td></tr>", vars["address"], vars["if"], vars["cost"]
}')"
echo "$neighbours" > /tmp/fff-web-ui.babel
touch $lockfile
fi
fi
echo -n "$neighbours"
%>
</table></td></tr>
<% fi %>
</table>
</fieldset>
<fieldset style="padding-bottom:12px">
<legend>Netz: Freifunk</legend>
<table>
@ -85,23 +144,36 @@ fi
<tr><th>Firmware Version:</th><td><%= ${FIRMWARE_VERSION} %></td></tr>
<tr><th>OpenWrt Version:</th><td><%= ${DISTRIB_DESCRIPTION} %></td></tr>
<tr><th>Kernel Version:</th><td><% uname -s -m -r %></td></tr>
<tr><th>Batman-Adv Version:</th><td><% cat /sys/module/batman_adv/version 2>/dev/null %></td></tr>
<tr><th>Fastd Version:</th><td><% fastd --version 2> /dev/null | cut -d' ' -f 2 %></td></tr>
<% if [ -e /sys/module/batman_adv/version ] ; then %>
<tr><th>Batman-Adv Version:</th><td><% cat /sys/module/batman_adv/version 2>/dev/null %></td></tr>
<% fi
if [ -f "$(command -v fastd)" ] ; then %>
<tr><th>Fastd Version:</th><td><% fastd --version 2> /dev/null | cut -d' ' -f 2 %></td></tr>
<% fi
if [ -e /lib/functions/fff/babel ]; then
. /lib/functions/fff/babel
babel_version=$(babel_get_version)
if [ $? -eq 0 ]; then
echo "<tr><th>Aktivierte Babel Version</th><td>"$babel_version"</td></tr>"
fi
fi %>
</table>
</fieldset>
<form method="post">
<fieldset style="padding-bottom:12px">
<legend>Hood</legend>
<table>
<tr><th style="width:200px">Hood:</th><td><% echo "$hood" %></td></tr>
<tr><th style="width:200px">Mesh-Type (2.4/5 GHz):</th><td><% echo "${mesh_type2} / ${mesh_type5}" %></td></tr>
<tr><th style="width:200px">Channel (2.4/5 GHz):</th><td>Ger&auml;t: <% echo "${real_chan2ghz} / ${real_chan5ghz}" %> | Hood: <% echo "${chan2ghz} / ${chan5ghz}" %></td></tr>
<tr><th style="width:200px">SSID (Client-AP):</th><td>Ger&auml;t: <% echo "${real_essid}" %> | Hood: <% echo "${essid}" %></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2">Beim Klicken werden die Hood-Daten innerhalb von 5 Minuten neu abgerufen und angewandt:</td></tr>
<tr><td colspan="2"><input type="submit" name="resethood" value="Reset hood data" /></td></tr>
</table>
</fieldset>
<% if [ -e /usr/lib/functions/fff/hoodfile ]; then %>
<fieldset style="padding-bottom:12px">
<legend>Hood</legend>
<table>
<tr><th style="width:200px">Hood:</th><td><% echo "$hood" %></td></tr>
<tr><th style="width:200px">Mesh-Type (2.4/5 GHz):</th><td><% echo "${mesh_type2} / ${mesh_type5}" %></td></tr>
<tr><th style="width:200px">Channel (2.4/5 GHz):</th><td>Ger&auml;t: <% echo "${real_chan2ghz} / ${real_chan5ghz}" %> | Hood: <% echo "${chan2ghz} / ${chan5ghz}" %></td></tr>
<tr><th style="width:200px">SSID (Client-AP):</th><td>Ger&auml;t: <% echo "${real_essid}" %> | Hood: <% echo "${essid}" %></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2">Beim Klicken werden die Hood-Daten innerhalb von 5 Minuten neu abgerufen und angewandt:</td></tr>
<tr><td colspan="2"><input type="submit" name="resethood" value="Reset hood data" /></td></tr>
</table>
</fieldset>
<% fi %>
</form>
<fieldset style="padding-bottom:12px">
<legend>Netz: WAN</legend>

View File

@ -151,7 +151,7 @@ format_port() {
</fieldset>
</td></tr>
<% fi %>
<% if grep -q "ONE_PORT" "/etc/network.$board_name" || grep -q "ETHPORT" "/etc/network.$board_name" ; then %>
<% if grep -q "ONE_PORT" "/etc/network.$board_name" ; then %>
<%
# Device has a port set by $ETHMODE
. /etc/network.mode

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-wireguard
PKG_RELEASE:=8
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk
@ -14,7 +14,7 @@ define Package/fff-wireguard
+kmod-wireguard \
+owipcalc \
+wireguard-tools \
+fff-babeld \
+fff-babel \
+fff-network
endef

View File

@ -31,7 +31,7 @@ configure() {
fi
}
config_load babeld
config_load network
config_foreach remove_wgpeer interface
@ -128,7 +128,7 @@ configure() {
babel_add_iifrules "$prefixname" || { echo "ERROR: Could not add iif-rules for wgpeer $name"; exit 1; }
# add babel interface
babel_add_interface "$prefixname" "$prefixname" 'wired' "$rxcost" || { echo "ERROR: Could not add babeld interface for wgpeer $name"; exit 1; }
babel_add_interface "$prefixname" "$prefixname" 'wired' "$rxcost" || { echo "ERROR: Could not add babel interface for wgpeer $name"; exit 1; }
}
config_load gateway
@ -137,12 +137,16 @@ configure() {
apply() {
uci commit network
uci commit babeld
uci commit gateway
babel_apply
}
reload() {
babel_reload
}
revert() {
uci revert network
uci revert babeld
uci revert gateway
babel_revert
}

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-wireless
PKG_RELEASE:=20
PKG_RELEASE:=$(COMMITCOUNT)
include $(INCLUDE_DIR)/package.mk

View File

@ -22,9 +22,9 @@ wifiGetFreq() {
local radio=$1
# Use hwmode for switching, since this is always set by firmware (effectively hard-coded)
# Use uci radio band for switching, since this is always set by firmware (effectively hard-coded)
# Do not use channel, as this might be "auto" for both
[ "$(uci get "wireless.${radio}.hwmode")" = "11a" ] && echo "5" || echo "2"
[ "$(uci get "wireless.${radio}.band")" = "5g" ] && echo "5" || echo "2"
return 0
}
# vim: set noexpandtab:tabstop=4

View File

@ -1,56 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff
PKG_RELEASE:=9
include $(INCLUDE_DIR)/package.mk
define Package/fff-variant/default
SECTION:=base
CATEGORY:=Freifunk
URL:=https://www.freifunk-franken.de
DEFAULT:=$(if $(filter fff-variant-$(FFF_VARIANT),$(1)),y,n)
DEPENDS:= \
+iptables \
+ip6tables \
+micrond \
+odhcp6c \
+fff-config \
+fff-network \
+fff-nodewatcher \
+fff-simple-tc \
+fff-support \
+fff-sysupgrade \
+fff-timeserver \
+fff-web-ui \
+fff-wireless
endef
define Package/fff-variant/default/description
This package is used to switch one of the variants on by default
endef
define Package/fff-variant-layer3
$(Package/fff-variant/default)
TITLE:=Freifunk-Franken Layer3 Variant
DEPENDS+=+fff-layer3
VARIANT:=layer3
endef
define Package/fff-variant-layer3/description
$(Package/fff-variant/default/description)
endef
define Package/fff-variant-node
$(Package/fff-variant/default)
TITLE:=Freifunk-Franken Node Variant
DEPENDS+=+fff-node
VARIANT:=node
endef
define Package/fff-variant-node/description
$(Package/fff-variant/default/description)
endef
$(eval $(call BuildPackage,fff-variant-layer3))
$(eval $(call BuildPackage,fff-variant-node))