aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
Commit message (Collapse)AuthorAgeFilesLines
* dnsmasq: distinct Ubus names for multiple instancesEtan Kissling2021-07-191-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, when using multiple dnsmasq instances they are all assigned to the same Ubus instance name. This does not work, as only a single instance can register with Ubus at a time. In the log, this leads to `Cannot add object to UBus: Invalid argument` error messages. Furthermore, upstream 3c93e8eb41952a9c91699386132d6fe83050e9be changes behaviour so that instead of the log, dnsmasq exits at start instead. With this patch, all dnsmasq instances are assigned unique names so that they can register with Ubus concurrently. One of the enabled instances is always assigned the previous default name "dnsmasq" to avoid breaking backwards compatibility with other software relying on that default. Previously, a random instance got assigned that name (while the others produced error logs). Now, the first unnamed dnsmasq config section is assigned the default name. If there are no unnamed dnsmasq sections the first encountered named dnsmasq config section is assigned instead. A similar issue exists for Dbus and was similarly addressed. Signed-off-by: Etan Kissling <etan.kissling@gmail.com> [tweaked commit message] dnsmasq was not crashing it is exiting Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (cherry picked from commit ba5bd8e556b2e7573d27b16e005ba287e066f795)
* dnsmasq: add /tmp/hosts/ to jail_mountNick Hainke2021-07-191-1/+1
| | | | | | | | Programs like the olsr-name-plugin write hostname files to "/tmp/hosts/". If you don't add this to the jail_mount, dnsmasq can't read it anymore. Signed-off-by: Nick Hainke <vincent@systemli.org> (cherry picked from commit 3a94c2ca5cf7c11ca150fa3ae884e7be8d07a281)
* odhcpd: fix invalid DHCPv6 ADVERTSIE with small configured leasetime (FS#3935)Hans Dedecker2021-07-191-3/+3
| | | | | | | bc9d317 dhcpv6-ia: fix invalid preferred lifetime Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (cherry picked from commit 033d5ff25eaf4facbaab09153982e7321fe282e6)
* netifd: update to the latest versionFelix Fietkau2021-07-141-3/+3
| | | | | | | 7f24a063475e vlan: fix device vlan alias handling Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit d1a812c49b57636efcb9ef6f5f0aff4f11eb6b36)
* netifd: update to the latest versionFelix Fietkau2021-07-131-3/+3
| | | | | | | | | | | | | | | | | | | | 61a71e5e49c3 bridge: dynamically create vlans for hotplug members cb6ee9608e10 bridge: fix dynamic delete of hotplug vlans 7f199050f395 wireless: pass the real network ifname to the setup script 50381d0a2998 bridge: allow adding/removing VLANs to configured member ports via hotplug f12b073c0cc3 wireless: add some comments to functions b0d090688302 bridge: fix setting pvid for updated vlans ff3764ce28e0 device: move hotplug handling logic from system-linux.c to device.c 16bff892f415 ubus: add a dummy mode ubus call to simulate hotplug events 7f30b02013f2 examples: make dummy wireless vif names shorter 013a1171e9b0 device: do not treat devices with non-digit characters after . as vlan devices f037b082923a wireless: handle WDS per-sta devices db0fa24e1c17 bridge: fix enabling hotplug-added VLANs on the bridge port 4e92ea74273f bridge: bring up pre-existing vlans on hotplug as well 1f283c654aeb bridge: fix hotplug vlan overwrite on big-endian systems Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 1236cbe30cec8e3e8246237005140596f8611ce9)
* iwinfo: move device info into -data packageJo-Philipp Wich2021-07-112-4/+40
| | | | | | | | | | Backport upstream patch a0a0e02 ("iwinfo: rename hardware.txt to devices.txt") and split devices.txt (former hardware.txt) into a common libiwinfo-data package to allow different libiwinfo versions to coexist without file clashes. Signed-off-by: Jo-Philipp Wich <jo@mein.io> (backported from commit c13d7c82aa4cd2cbf1f61bad857cd01b795318e3)
* hostapd: make wnm_sleep_mode_no_keys configurableTimo Sigurdsson2021-07-052-4/+8
| | | | | | | | | | | | | | | In the aftermath of the KRACK attacks, hostapd gained an AP-side workaround against WNM-Sleep Mode GTK/IGTK reinstallation attacks. WNM Sleep Mode is not enabled by default on OpenWrt, but it is configurable through the option wnm_sleep_mode. Thus, make the AP-side workaround configurable as well by exposing the option wnm_sleep_mode_no_keys. If you use the option wpa_disable_eapol_key_retries and have wnm_sleep_mode enabled, you might consider using this workaround. Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> [bump PKG_RELEASE] Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit bf98faaac8ed24cf7d3d93dd4fcd7304d109363b)
* hostapd: make country3 option configurableTimo Sigurdsson2021-07-052-3/+4
| | | | | | | | | | | | | The country3 option in hostapd.conf allows the third octet of the country string to be set. It can be used e.g. to indicate indoor or outdoor use (see hostapd.conf for further details). Make this option configurable but optional in OpenWrt. Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> [bump PKG_RELEASE, rebase] Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 9f09c1936a4a13b67fcba632f7ca02331f685359) Signed-off-by: Paul Spooren <mail@aparcar.org>
* iwinfo: build with nl80211 backend only and make sharedJo-Philipp Wich2021-07-021-19/+5
| | | | | | | | | | | | Drop support for building the obsolete broadcom-wl backend and always forcibly enable the nl82011 support. This allows us to make the package shared again since no target specific compilation is happening anymore. This will solve various repository coherency issues related to unavailable libiwinfo versions in the long run. Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 5a1065758b88b568a04a50189400321601904bdf)
* package/comgt: Handle bind/unbind eventsArjun AK2021-07-021-0/+2
| | | | | | | | | | | | | | This script was expecting only add/remove events which has not been the case since Kernel 4.12 (which added bind/unbind). Bind events were getting treated as remove events which would cause hotplugged 3g modems to not work. More info: https://lkml.org/lkml/2018/12/23/128 https://github.com/systemd/systemd/issues/8221 Signed-off-by: Arjun AK <arjunak234@gmail.com> (cherry picked from commit 89ef883b92b3a87d9ab1bd289de26b9e72681dac)
* iwinfo: update to latest Git HEADDavid Bauer2021-06-271-4/+4
| | | | | | | c45f0b5 iwinfo: add 802.11ax HE rate information Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 5515c29029ce7c63b48d1af0cbb3fbdc14ca033b)
* iwinfo: update to latest Git HEADDavid Bauer2021-06-271-4/+4
| | | | | | | | | 50b64a6 iwinfo: add basic IEEE 802.11ax support 70d2136 iwinfo: nl80211: perform split wiphy dump cd23727 iwinfo: cli: fix hwmode formatting Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 6f77ce77248d6458414efafd64c72d653fc70bb8)
* hostapd: fix handling of the channel utilization optionsTimo Sigurdsson2021-06-221-0/+2
| | | | | | | | | | | | | Commit 0a7657c ("hostapd: add channel utilization as config option") added the two new uci options bss_load_update_period and chan_util_avg_period. However, the corresponding "config_add_int" calls for these options weren't added, so attempting to actually use these options and change their values is bound to fail - they always stay at their defaults. Add the missing code to actually make these options work. Fixes: 0a7657c ("hostapd: add channel utilization as config option") Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> (cherry picked from commit 85ce590705072be78c3ef7dc6b64e3b1facc892b)
* hostapd: wolfssl: add RNG to EC keyDavid Bauer2021-06-212-1/+49
| | | | | | | | | | | Since upstream commit 6467de5a8840 ("Randomize z ordinates in scalar mult when timing resistant") WolfSSL requires a RNG for the EC key when built hardened which is the default. Set the RNG for the EC key to fix connections for OWE clients. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit ddcb970274c011d3db611ec39350ee4704ff0e02)
* qos-scripts: add ifbN device before setting the link upPerry Melange2021-06-212-2/+3
| | | | | | | | | | | | | commit 50413e1ec83dedaea44558d5f37af5454156a46a replaced ifconfig with ip. In order to set a link state to up, the interface needs to be added first. Fixes: FS#3754 Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com> [Add Fixes tag] Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org> (cherry picked from commit 23c3bab9209f984692f8206c0d97758ee223a26f)
* iw: update to 8fab0c9eAndre Heider2021-06-172-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes `iw dev wlan0-mesh station dump`. 8fab0c9 iw: fix ftm_request missing arguments segfault e816fbc iw: fix mgmt dump missing arguments segfault 5d9d1b8 iw: Fix timestamp output on 32-bit architectures 4b25ae3 iw: fix pointer arithmetic in __print_he_capa c3df363 iw: add option to print human readable event time cd64525 iw: print ctrl port tx status event 0ba98b9 iw: use correct type in policy check for mesh 9e38dee iw: scan: fixup HE caps whitespace 17e8564 iw: scan: parse HE capabilities 5735e58 iw: util: factor out HE capability parser 6d8d507 iw: scan: add extension tag parsing b4e1ec4 man: update wikipage URL, reformat SEE ALSO section c56036a iw: enable 80MHz support for 6GHz band 11s mesh fa72728 iw: handle positive error codes gracefully 7ba9093 iw: scan: add flag for scanning colocated ap 5ec60ed iw: Add 'coloc' and 'flush' options to sched_scan f8ade75 iw: update wikipage URL b6f2dac iw: Add support for specifying the 160MHz bandwidth when setting the channel/frequency Signed-off-by: Andre Heider <a.heider@gmail.com> (cherry-picked from commit b5420dd710aaad703f6f7a900840609d4d1176a1)
* mac80211: sync nl80211.h with upstream and backport a WPA3 related commitFelix Fietkau2021-06-171-2/+277
| | | | | | | Fixes compatibility issues with the latest hostapd update Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 91abeebd3bd29a98de516e49260d61165096009a)
* umbim: fix return value of proto_mbim_setup()Adrian Schmutzler2021-06-081-1/+1
| | | | | | | | The variable name appears to be mistyped. Suggested-by: Howard Chu <hyc@symas.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 6bc4c0ae3eb3dff6e410b5b012ab0bec267adb5a)
* netifd: update to the latest masterRafał Miłecki2021-05-261-3/+3
| | | | | | | | 899c2a4 interface: support "device" attribute and deprecate "ifname" 62e3cb5 scripts/netifd-wireless.sh: add support for specifying the operating band Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5fe549836fefea5ed656d73a0040dd0451f84705)
* netifd: update to the latest masterRafał Miłecki2021-05-261-3/+3
| | | | | | | | config: fix ifname->ports compat rename Fixes: 829b5c2ba32f ("netifd: update to the latest version") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit cea6631cdf09c577ae87a21bc3b03273a233c17e)
* netifd: update to the latest versionFelix Fietkau2021-05-261-4/+4
| | | | | | | | | | | 02dd2f2df7cb fix unannotated fall-through warnings 3052f2f67686 extdev: remove unused function 2a97fd006c3b device: add support for configuring devices with external auth handler 87e469be0c08 wireless: fix memory corruption bug when using vlans/station entries in the config 7277764bf817 bridge: rename "ifname" attribute to "ports" Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit 829b5c2ba32f5ec821eab6762deecdf3522470a9)
* netifd: read udhcpc user scripts from directoryLeon M. George2021-05-262-1/+6
| | | | | | | | | | | | | | | Placeholder DHCP user scripts were added recently. These files make package-based installations of such scripts more difficult. Pull user callbacks from directories instead to allow packages and users to install co-existing scripts more easily. References: 130118f7a netifd: add a udhcpc.user placeholder script Signed-off-by: Leon M. George <leon@georgemail.eu> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase] (cherry picked from commit 467c32600cc575fcb67c5f01ad32e02141220ceb)
* netifd: update to Git version 2021-04-03Hauke Mehrtens2021-05-261-3/+3
| | | | | | | | f8899b9 netifd: bridge: set default value for igmp_snoop 327da98 netifd: add possibility to switch off route config Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit b974293efa24b8e1bf859b1ed253ca0042ab273e)
* netifd: update to git HEADDaniel Golle2021-05-261-3/+3
| | | | | | | | | | | 09632d4 device: remove left-over comment b22f83d handler: add mechanism to generate external device handler stubs 80bf9d7 extdev: add support for external device handlers 44c0f40 system-linux: reorder sysctl functions c84f3b0 system-linux: add device options used by wpad Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit e62ace0ecf228f3a8bc86cea2252539ac7fd988c)
* netifd: add a udhcpc.user placeholder scriptRui Salvaterra2021-05-262-1/+6
| | | | | | | | | Document the existence of this feature. This allows the user to execute a script at each DHCPv4 event. This is useful, for example, as an ad-hoc way to update a DDNS entry when (and only when) required. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> (cherry picked from commit 130118f7aa3191a2afd244d49e3057d4c5688676)
* treewide: Mark packages nonshared if they depend on @TARGET_Hauke Mehrtens2021-05-241-0/+2
| | | | | | | | | | | | | | | This marks all packages which depend on a target with @TARGET nonshared. If they are not marked nonshared they would be build by the SDK build and if this happens with a different SDK, then the SDK from the target the package depends on, the package would not be added to the index. This should fix the image builder for some of these packages. This should fix the image builder at least for bcm27xx/bcm2710 and bcm4908/generic. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 1903233f2b312caf87aa369cd325d9689c45a1c6)
* uqmi: fix network registration loopThomas Richard2021-05-112-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With some debug in qmi.sh using following patch, some errors are visible in the registration step @@ -29,6 +29,7 @@ proto_qmi_init_config() { } proto_qmi_setup() { + set -x local interface="$1" local dataformat connstat plmn_mode mcc mnc local device apn auth username password pincode delay modes pdptype @@ -224,6 +225,8 @@ proto_qmi_setup() { fi done + registration=$(uqmi -s -d "$device" --get-serving-system) + [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1 echo "Starting network $interface" During the boot of the system, modem could not start automatically its network registration. netifd: wan (9235): + echo 'Waiting for network registration' netifd: wan (9235): Waiting for network registration netifd: wan (9235): + local 'registration_timeout=0' netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system netifd: wan (9235): + grep '"searching"' netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system netifd: wan (9235): + registration='{"registration":"not_registered","plmn_mcc":208,"plmn_mnc":20,"plmn_description":"","roaming":true}' netifd: wan (9235): + '[' -n ] netifd: wan (9235): + echo 'Starting network wan' As the while loop checks only "searching" pattern, uqmi.sh script quits searching loop and continues whereas the modem is not registered Other issue, after X seconds modem stops searching. netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system netifd: wan (9213): + grep '"searching"' netifd: wan (9213): + '[' -e /dev/cdc-wdm0 ] netifd: wan (9213): + '[' 3 -lt 0 -o 0 '=' 0 ] netifd: wan (9213): + let registration_timeout++ netifd: wan (9213): + sleep 1 netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system netifd: wan (9213): + grep '"searching"' netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system netifd: wan (9213): + registration='{"registration":"not_registered"}' netifd: wan (9213): + '[' -n ] netifd: wan (9213): + echo 'Starting network wan' netifd: wan (9213): Starting network wan If registration_timeout is not expired, registration can be restarted Signed-off-by: Thomas Richard <thomas.richard@kontron.com> Tested-by: Florian Eckert <fe@dev.tdt.de> (cherry picked from commit 2eda042d553c23590c9d6ade8a1a17ffcfb4be7c)
* dnsmasq: Update to version 2.85Alan Swanson2021-05-054-92/+6
| | | | | | | | | | | | | | | | | | | | | | Fixes issue with merged DNS requests in 2.83/2.84 not being retried on the firsts failed request causing lookup failures. Also fixes the following security problem in dnsmasq: * CVE-2021-3448: If specifiying the source address or interface to be used when contacting upstream name servers such as: server=8.8.8.8@1.2.3.4, server=8.8.8.8@1.2.3.4#66 and server=8.8.8.8@eth0 then all would use the same socket bound to the explicitly configured port. Now only server=8.8.8.8@1.2.3.4#66 will use the explicitly configured port and the others random source ports. Remove upstreamed patches and update remaining patch. Signed-off-by: Alan Swanson <reiver@improbability.net> [refreshed old runtime support patch] Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (cherry picked from commit 3980daffa4e284377cd1ae803fba78331c1fc40b)
* ltq-dsl-base: Make package nonshared to fix image builderHauke Mehrtens2021-05-041-0/+2
| | | | | | | | | | | This package depends on the lantiq target and is only build for that target. A normal package would be build by the SDK builder probably under a different target and then this package will not be selected. Mark it as nonshared to build it when the lantiq target gets build. Fixes: FS#3773, FS#3774 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 454d514f4647d6f1f0d93d8f67abdef94cd66a7d)
* ltq-vdsl-app: extent dsl metrics with state_num and power_state_numFlorian Eckert2021-04-191-14/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the old ubus dsl API, the numbers for the individual line_states and power_states were also returned. These were not ported to the new DSL C-API. This commit adds the missing information. For this the internal values are mapped to numbers. * additional JSON output for state_num: "state_num": <map_state_number> Since not all values are meaningful only the following values are implemented, this can be extended if the future. * LSTATE_MAP_NOT_INITIALIZED * LSTATE_MAP_EXCEPTION * LSTATE_MAP_IDLE * LSTATE_MAP_SILENT * LSTATE_MAP_HANDSHAKE * LSTATE_MAP_FULL_INIT * LSTATE_MAP_SHOWTIME_NO_SYNC * LSTATE_MAP_SHOWTIME_TC_SYNC * LSTATE_MAP_RESYNC * additinal JSON output for power_level: "power_state_num": <map_power_satte_number>, Since there are not so many here, all are mapped. * PSTATE_MAP_NA, * PSTATE_MAP_L0, * PSTATE_MAP_L1, * PSTATE_MAP_L2, * PSTATE_MAP_L3, Signed-off-by: Florian Eckert <fe@dev.tdt.de> v6: Add state LSTATE_MAP_NOT_INITILIZED at the beginning of the list Start the list LSTATE_MAP with -1 Reviewed-by: Andre Heider <a.heider@gmail.com> (cherry picked from commit 4407d45d9667ab3d376ad4a6b760e07f4dd43e49)
* lantiq: use ActualNetDataRate for speed reportingJeroen Peelaerts2021-04-192-1/+6
| | | | | | | | | | | | | | Switch to Actual Net Data Rate (ACTNDR) for speed reporting on lantiq VDSL modems Refer to ITU-T G.997.1 chapter 7.5.2.8 Independent whether retransmission is used or not in a given transmit direction: - In L0 state, this parameter reports the Net Data Rate (as specified in G.992.3, G.992.5 or G.993.2) at which the bearer channel is operating. - In L2 state, the parameter contains the Net Data Rate (as specified in G.992.3, G.992.5 or G.993.2) in the previous L0 state. Signed-off-by: Jeroen Peelaerts <jeroen.peelaerts@gmail.com> Reviewed-by: Andre Heider <a.heider@gmail.com> (cherry picked from commit 4f27ea7c33447f4b0c8e577509726927916b9625)
* lantiq: enable G.INP retransmission countersJeroen Peelaerts2021-04-191-2/+4
| | | | | | | | | | | | | | | | | This commit adds monitoring for a couple of DSL line features that are present in the lantiq firmware blobs. * G.INP ON/OFF * Trellis encoding ON/OFF * Virtaul Noise ON/OFF * Bitswap ON/OFF Difference in size for ltq-vdsl-app = 1k Difference in size for kmod-ltq-vdsl-vr9 < 1k Reviewed-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Jeroen Peelaerts <jeroen.peelaerts@gmail.com> (cherry picked from commit 48162e4c0c85a7f64d9007565bf5be2c7ace3ada)
* umdns: add missing syscalls to seccomp filterDaniel Golle2021-04-181-27/+30
| | | | | | | | | | | | | | | | Looks like 'openat', 'pipe2' and 'ppoll' are now needed, possibly due to changes on libraries used by umdns now using slightly different calls. Found using /etc/init.d/umdns trace now use umdns, ie. cover all ubus call etc., then /etc/init.d/umdns stop find list of syscalls traced in /tmp/umdns.*.json Fixes: FS#3355 ("UMDNS: does not start on master with seccomp") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 00a85a163405fdf9bee4d8c3f0ee87ca9ed259d6)
* umdns: add syscalls needed on Aarch64Daniel Golle2021-04-181-0/+1
| | | | | | | | Now that ujail supports seccomp also on Aarch64, add missing syscall 'fstat' to the list of allowed syscalls. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit d28880cdd86e10142fd86936f5da188eaeeaf9eb)
* iproute2: fix libbpf detection with NLS enabledTony Ambardar2021-04-102-1/+21
| | | | | | | | | | | | | | | | | | Upstream iproute2 detects libbpf using a one-line $CC test-compile, which normally ignores LDFLAGS. With NLS enabled however, LDFLAGS includes an "rpath-link" linker option needed to resolve libintl.so. Its absence causes both the compile and libbpf detection to fail: ld: warning: libintl.so.8, needed by libbpf.so, not found (try using -rpath or -rpath-link) ld: libelf.so.1: undefined reference to `libintl_dgettext' collect2: error: ld returned 1 exit status Fix this by directly including $LDFLAGS in the test-compile command. Reported-by: Ian Cooper <iancooper@hotmail.com> Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit aab3a04ce87c27996b7ce9ea306db8c6eed86941)
* bpftools: drop unneeded libintl linking for NLSTony Ambardar2021-04-101-5/+1
| | | | | | | | | There is no direct linking of libintl from bpftools, only secondary linking through libelf, so remove "-lintl" from TARGET_LDFLAGS. Fixes: 5582fbd6135f ("bpftools: support NLS, fix ppc build and update to 5.8.9") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit c8c638a19b63bf6c3bf8094aebd8fde6feda36ba)
* iproute2: separate tc into tiny and full variantsTony Ambardar2021-04-101-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was investigated previously [1] but not deemed necessary. With the recent addition [2] of modern BPF loader support, however, tc gained dependencies on libelf and libbpf, with a larger installation footprint. Similar to ip-tiny/ip-full, split tc into tc-full and tc-tiny variants, where the latter excludes the eBPF loader, uses a smaller executable, and avoids libelf and libbpf package dependencies. Both variants provide the 'tc' virtual package, with tc-tiny as the default. The previous tc package included a loadable module for iptables actions. Separate this out into a common package, tc-mod-iptables, which both variants depend on. Some package sizes on mips_24kc: Before: 148343 tc_5.11.0-1_mips_24kc.ipk After: 144833 tc-full_5.11.0-2_mips_24kc.ipk 138430 tc-tiny_5.11.0-2_mips_24kc.ipk (and no libelf or libbpf) 4115 tc-mod-iptables_5.11.0-2_mips_24kc.ipk Also fix up some Makefile indentation. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447619962 [2] b048a305a3d3 ("iproute2: update to 5.11.0") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 72885e9608d9c0fa06abce6bdb6dd054c2116eb7)
* kernel/modules: relocate teql hotplug from iproute2 to kmod-schedTony Ambardar2021-04-102-25/+0
| | | | | | | | | | | | | | | The link equalizer sch_teql.ko of package kmod-sched relies on a hotplug script historically included in iproute2's tc package. In previous discussion [1], consensus was the hotplug script is best located together with the module in kmod-sched, but this change was deferred at the time. Relocate the hotplug script now. This change also simplifies adding a tc variant for minimal size with reduced functionality. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447923636 Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 863ce4f15f74a674f01ab47f445b362c113b113b)
* iproute2: add missing limits.h includesTony Ambardar2021-04-101-0/+45
| | | | | | | | | | | | | | | | This patch has been submitted upstream to fix an error reported by a few users. One instance seen using gcc 10.2.0, binutils 2.35.1 and musl 1.1.24: bpf_glue.c: In function 'get_libbpf_version': bpf_glue.c:46:11: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? 46 | char buf[PATH_MAX], *s; | ^~~~~~~~ | AF_MAX Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 10ffefe60299637bc592ec4ef0dde93e0e2e8344)
* iproute2: update to 5.11.0Tony Ambardar2021-04-1011-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest iproute2 version brings various improvements and fixes: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/?qt=range&q=v5.10.0..v5.11.0 In particular, ip and tc now use libbpf as the standard way to load BPF programs, rather than the old, limited custom loader. This allows more consistent and featureful BPF program handling e.g. support for global initialized variables. Also fix a longstanding problem with iproute2 builds where unneeded DSO dependencies are added to most utilities, bloating their installation footprint. From research and testing, explicitly using a "--as-needed" linker flag avoids the issue. Update accordingly and drop extra package dependencies from Makefile. Additional build and packaging updates include: - install missing development header to iproute2/bpf_elf.h - propagate OpenWrt verbose flag during build - update and refresh patches Compile and run tested: QEMU/malta-mips32be on kernels 5.4 & 5.10. All iproute2 packages were built and installed to the test image. Some regression testing using ip-full and tc was successfully performed to exercise several kmods, tc modules, and simple BPF programs. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit b048a305a3d3cbb5375e32757e70aa129b4c7c4f)
* wireguard-tools: depend on kmod-wireguardIlya Lipnitskiy2021-04-101-1/+4
| | | | | | | | | | | | | | | | To the vast majority of the users, wireguard-tools are not useful without the underlying kernel module. The cornercase of only generating keys and not using the secure tunnel is something that won't be done on an embedded OpenWrt system often. On the other hand, maintaining a separate meta-package only for this use case introduces extra complexity. WireGuard changes for Linux 5.10 remove the meta-package. So let's make wireguard-tools depend on kmod-wireguard to make WireGuard easier to use without having to install multiple packages. Fixes: ea980fb9 ("wireguard: bump to 20191226") Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> (cherry picked from commit cbcddc9f318607881799e329b327a68c4e76d5cb)
* wireguard-tools: bump to 1.0.20210223Jason A. Donenfeld2021-04-101-2/+2
| | | | | | | Simple version bump with accumulated fixes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> (cherry picked from commit e0f7f5bbce0d03e5192b5dad5a24fcb8566da97f)
* kernel: migrate wireguard into the kernel treeIlya Lipnitskiy2021-04-101-88/+0
| | | | | | | | | | | | On Linux 5.4, build WireGuard from backports. Linux 5.10 contains wireguard in-tree. Add in-kernel crypto libraries required by WireGuard along with arch-specific optimizations. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> (cherry picked from commit 06351f1bd0455abacb700db5098bb798f66948fc) (cherry picked from commit 464451d9ab824c2ed62f7da33f0a965f562714c8)
* mac80211: backport upstream patches for driver disconnectFelix Fietkau2021-04-041-2/+8
| | | | | | | Needed for an mt76 update Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 5dc501507222b38d731b89c3311d8253b73dd0e7)
* bpftools: fix libbpf pkgconfig fileTony Ambardar2021-03-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | The pkgconfig file hardcodes a host library directory which cannot be overridden by OpenWrt during builds. Use SED to fix this and potential include directory problems, as is done with several other packages. This fixes a strange issue intermittently seen building iproute2 on the oxnas target: iptables modules directory: /usr/lib/iptables libc has setns: yes SELinux support: no libbpf support: no libbpf version 0.3.0 is too low, please update it to at least 0.1.0 LIBBPF_FORCE=on set, but couldn't find a usable libbpf Fixes: 2f0d672088c3 ("bpftools: add utility and library packages supporting eBPF usage") Reported-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 9e64e4ce26719ea81637b0e3d9754bd5190f0c21)
* ppp: compile fix: unset FILTER variable in MakefileEike Ritter2021-03-291-0/+12
| | | | | | | | | | | | | | | | | If the environment variable FILTER is set before compilation, compilation of the ppp-package will fail with the error message Package ppp is missing dependencies for the following libraries: libpcap.so.1 The reason is that the OpenWrt-patch for the Makefile only comments out the line FILTER=y. Hence the pcap-library will be dynamically linked if the environment variable FILTER is set elsewhere, which causes compilation to fail. The fix consists on explicitly unsetting the variable FILTER instead. Signed-off-by: Eike Ritter <git@rittere.co.uk> (cherry picked from commit 46cd0765d0c585dc0b48c8c0a3f116ef83cd580f)
* firewall3: update to latest git HEADTony Ambardar2021-03-291-3/+3
| | | | | | | | | | | | | | | | This includes several improvements and fixes: 61db17e rules: fix device and chain usage for DSCP/MARK targets 7b844f4 zone: avoid duplicates in devices list c2c72c6 firewall3: remove last remaining sprintf() 12f6f14 iptables: fix serializing multiple weekdays 00f27ab firewall3: fix duplicate defaults section detection e8f2d8f ipsets: allow blank/commented lines with loadfile 8c2f9fa fw3: zones: limit zone names to 11 bytes 78d52a2 options: fix parsing of boolean attributes Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 0d75aa27d4093625c85f2d2233dd5392a7e2aa32)
* uhttpd: update to git HEADHauke Mehrtens2021-03-211-4/+4
| | | | | | | 15346de client: Always close connection with request body in case of error Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 1170655f8b792b34f899350cb0272ad94bb2d3e2)
* uhttpd: Execute uci commit and reload_config onceHauke Mehrtens2021-03-211-4/+6
| | | | | | | | | Instead of doing uci commit and reload_config for each setting do it only once when one of these options was changed. This should make it a little faster when both conditions are taken. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 501221af542b5154fbf8788f8426bc7f5443764a)
* uhttpd: Reload config after uhttpd-mod-ubus was addedHauke Mehrtens2021-03-212-1/+3
| | | | | | | | | | | | | Without this change the config is only committed, but the uhttpd daemon is not reloaded. This reload is needed to apply the config. Without the reload of uhttpd, the ubus server is not available over http and returns a Error 404. This caused problems when installing luci on the snapshots and accessing it without reloading uhttpd. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit d25d281fd6686bda67636f6c1df918145b6cb738)