...
 
Commits (20)
    https://gitcode.net/mirror/openwrt/routing/-/commit/12577be7ed6739fa9aa613dcaacd5555db286a66 batman-adv: Merge bugfixes from 2023.2 2023-08-18T15:52:18+02:00 Sven Eckelmann sven@narfation.org * Broken sync while rescheduling delayed work * compat: Use native kstrtox.h for 5.10.185 * Do not get eth header before batadv_check_management_packet * Trigger events for auto adjusted MTU * Don't increase MTU when set by user * Fix TT global entry leak when client roamed back * Fix batadv_v_ogm_aggr_send memory leak Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:sven@narfation.org" title="sven@narfation.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:sven@narfation.org" title="sven@narfation.org">Sven Eckelmann</a> &lt;<a href="mailto:sven@narfation.org" title="sven@narfation.org">sven@narfation.org</a>&gt;</span> https://gitcode.net/mirror/openwrt/routing/-/commit/05b717a999427e02473489d8edad7b667f0a7136 Merge pull request #1014 from ecsv/batadv-for-22.03 2023-08-18T17:40:12+02:00 Simon Wunderlich sw@simonwunderlich.de openwrt-22.03: batman-adv: Merge bugfixes from 2023.2 https://gitcode.net/mirror/openwrt/routing/-/commit/7b3fd6323dfc9d66d4506d4363ce7f2ed1d8cf81 batman-adv: Fix lock assert after fragmentation change 2023-08-22T18:54:12+02:00 Sven Eckelmann sven@narfation.org The automatic recalculation of the maximum allowed MTU is usually triggered by code sections which are already rtnl lock protected by callers outside of batman-adv. But when the fragmentation setting is changed via batman-adv's own batadv genl family, then the rtnl lock is not yet taken. But dev_set_mtu requires that the caller holds the rtnl lock because it uses netdevice notifiers. And this code will then fail the check for this lock: RTNL: assertion failed at net/core/dev.c (1953) Fixes: <a href="/mirror/openwrt/routing/-/commit/12577be7ed6739fa9aa613dcaacd5555db286a66" data-original="12577be7ed67" data-link="false" data-link-reference="false" data-project="28801" data-commit="12577be7ed6739fa9aa613dcaacd5555db286a66" data-reference-type="commit" data-container="body" data-placement="top" title="batman-adv: Merge bugfixes from 2023.2" class="gfm gfm-commit has-tooltip">12577be7</a> ("batman-adv: Merge bugfixes from 2023.2") Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:sven@narfation.org" title="sven@narfation.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:sven@narfation.org" title="sven@narfation.org">Sven Eckelmann</a> &lt;<a href="mailto:sven@narfation.org" title="sven@narfation.org">sven@narfation.org</a>&gt;</span> https://gitcode.net/mirror/openwrt/routing/-/commit/f47368cba4eb02005e600de734a28c47ae76bda9 Merge pull request #1017 from ecsv/batadv-for-22.03 2023-08-23T08:47:03+02:00 Simon Wunderlich sw@simonwunderlich.de openwrt-22.03: batman-adv: Fix lock assert after fragmentation change https://gitcode.net/mirror/openwrt/routing/-/commit/fe557608333c87324c60fc1c2a5c1c4c46f59ebe ci: Use openwrt/gh-action-sdk@v5 2023-09-01T21:54:45+02:00 Jeffery To jeffery.to@gmail.com The previous build errors with v5 have been fixed. This version builds packages as a normal user instead of as root. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg4" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/e2d72c57756751230d61bd7a738a35dad912e644" data-original="e2d72c57756751230d61bd7a738a35dad912e644" data-link="false" data-link-reference="false" data-project="28801" data-commit="e2d72c57756751230d61bd7a738a35dad912e644" data-reference-type="commit" data-container="body" data-placement="top" title="ci: Use openwrt/gh-action-sdk@v5" class="gfm gfm-commit has-tooltip">e2d72c57</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/b1ca335bf54892c59c9fe80d8d71e8763df6bc2e ci: update github actions to v3 2023-09-01T21:55:08+02:00 Christian Marangi ansuelsmth@gmail.com Update checkout and upload-artifact action to v3 to mute nodejs deprecation warning. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">Christian Marangi</a> &lt;<a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">ansuelsmth@gmail.com</a>&gt;</span> (cherry picked from commit 52570d4242822e3db678f5484c2ca3e72f485d52) (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/5d87b956975034d74a40385646a7d358722c0eb3" data-original="5d87b956975034d74a40385646a7d358722c0eb3" data-link="false" data-link-reference="false" data-project="28801" data-commit="5d87b956975034d74a40385646a7d358722c0eb3" data-reference-type="commit" data-container="body" data-placement="top" title="ci: update github actions to v3" class="gfm gfm-commit has-tooltip">5d87b956</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/8e68501e2e8fa7d077b50d6a8d0234f989f486af github-ci: error on any shell errors 2023-09-01T21:55:16+02:00 Alois Klink alois@aloisklink.com Enable `errexit` and `nounset` [POSIX shell options][1] in `.github/workflows/entrypoint.sh` so that the script fails if any command within the script fails. [1]: <a href="https://pubs.opengroup.org/onlinepubs/9699919799//utilities/V3_chap02.html#set" rel="nofollow noreferrer noopener" target="_blank">https://pubs.opengroup.org/onlinepubs/9699919799//utilities/V3_chap02.html#set</a>Reported-by: <span data-trailer="Reported-by:"><a href="mailto:m95d+git@psihoexpert.ro" title="m95d+git@psihoexpert.ro"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:m95d+git@psihoexpert.ro" title="m95d+git@psihoexpert.ro">Marius Dinu</a> &lt;<a href="mailto:m95d+git@psihoexpert.ro" title="m95d+git@psihoexpert.ro">m95d+git@psihoexpert.ro</a>&gt;</span> Fixes: <a href="https://github.com/openwrt/packages/issues/19953" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openwrt/packages/issues/19953</a>Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:alois@aloisklink.com" title="alois@aloisklink.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg4" style="text-decoration: none">N</a><a href="mailto:alois@aloisklink.com" title="alois@aloisklink.com">Alois Klink</a> &lt;<a href="mailto:alois@aloisklink.com" title="alois@aloisklink.com">alois@aloisklink.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/03ca0722f73c8121521ff59ca9a4ad6358b6a262" data-original="03ca0722f73c8121521ff59ca9a4ad6358b6a262" data-link="false" data-link-reference="false" data-project="28801" data-commit="03ca0722f73c8121521ff59ca9a4ad6358b6a262" data-reference-type="commit" data-container="body" data-placement="top" title="github-ci: error on any shell errors" class="gfm gfm-commit has-tooltip">03ca0722</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/120bf33284319845659f9b825df9c26ea20bd1c1 ci: change default packages 2023-09-01T21:55:27+02:00 Josef Schlehofer pepe.schlehofer@gmail.com Since this file was taken from packages repository, it tries to compile packages from that repository as fallback if changes are not detected. Let's change these packages to some, which are present in this repository, so they will be compiled as test. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:pepe.schlehofer@gmail.com" title="pepe.schlehofer@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:pepe.schlehofer@gmail.com" title="pepe.schlehofer@gmail.com">Josef Schlehofer</a> &lt;<a href="mailto:pepe.schlehofer@gmail.com" title="pepe.schlehofer@gmail.com">pepe.schlehofer@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/c9a8f2d03226191111b95890302cb7e1ff18c11e" data-original="c9a8f2d03226191111b95890302cb7e1ff18c11e" data-link="false" data-link-reference="false" data-project="28801" data-commit="c9a8f2d03226191111b95890302cb7e1ff18c11e" data-reference-type="commit" data-container="body" data-placement="top" title="ci: change default packages" class="gfm gfm-commit has-tooltip">c9a8f2d0</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/42584b0cecaeb68443d9a9a804ea683f98fcfeb0 CI: deprecate $(AUTORELEASE) via comments 2023-09-01T21:55:43+02:00 Paul Spooren paul.spooren@rhebo.com Autorelease causes some issues like heavy bandwidth usage as well as non-deterministic package releases whenever someone doesn't use the full git log. With this comment all modified packages are checked and if they use the autorelease feature, kindly comment to the user to change that. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:paul.spooren@rhebo.com" title="paul.spooren@rhebo.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:paul.spooren@rhebo.com" title="paul.spooren@rhebo.com">Paul Spooren</a> &lt;<a href="mailto:paul.spooren@rhebo.com" title="paul.spooren@rhebo.com">paul.spooren@rhebo.com</a>&gt;</span> [ move check to separate workflow to handle ci limitation ] Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">Christian Marangi</a> &lt;<a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">ansuelsmth@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/c993ee8a893c04baef602574ca9353ce4c72e11e" data-original="c993ee8a893c04baef602574ca9353ce4c72e11e" data-link="false" data-link-reference="false" data-project="28801" data-commit="c993ee8a893c04baef602574ca9353ce4c72e11e" data-reference-type="commit" data-container="body" data-placement="top" title="CI: deprecate $(AUTORELEASE) via comments" class="gfm gfm-commit has-tooltip">c993ee8a</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/dce4a4ca524bde4ff9b6ca0e7ccb13ba000023b8 ci: only comment AUTORELEASE deprecation if exists 2023-09-01T21:55:50+02:00 Paul Spooren mail@aparcar.org If it doesn't exists, don't confuse the contributors. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:mail@aparcar.org" title="mail@aparcar.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:mail@aparcar.org" title="mail@aparcar.org">Paul Spooren</a> &lt;<a href="mailto:mail@aparcar.org" title="mail@aparcar.org">mail@aparcar.org</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/b3b01af314ec675b0b2ee0497a7b9c90d2e9e631" data-original="b3b01af314ec675b0b2ee0497a7b9c90d2e9e631" data-link="false" data-link-reference="false" data-project="28801" data-commit="b3b01af314ec675b0b2ee0497a7b9c90d2e9e631" data-reference-type="commit" data-container="body" data-placement="top" title="ci: only comment AUTORELEASE deprecation if exists" class="gfm gfm-commit has-tooltip">b3b01af3</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/9fb0ed26c4a3eb6e1a0efaab800b430170d11aa2 CI: update build architectures 2023-09-01T21:56:02+02:00 Tianling Shen cnsztl@immortalwrt.org Removed arc_archs - archs38 was marked as source-only [1]. Renamed powerpc_8540 to powerpc_8548 [2]. 1. <a href="https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c01641bcc7236d2e2de3ea65444b0cf2898df351" rel="nofollow noreferrer noopener" target="_blank">https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c01641bcc7236d2e2de3ea65444b0cf2898df351</a> 2. <a href="https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=2cad88b99fdae9766de84e6c1cb56f111eb53748" rel="nofollow noreferrer noopener" target="_blank">https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=2cad88b99fdae9766de84e6c1cb56f111eb53748</a>Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org">Tianling Shen</a> &lt;<a href="mailto:cnsztl@immortalwrt.org" title="cnsztl@immortalwrt.org">cnsztl@immortalwrt.org</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/7928f7d3990c7bae097224d90c28590a45405686" data-original="7928f7d3990c7bae097224d90c28590a45405686" data-link="false" data-link-reference="false" data-project="28801" data-commit="7928f7d3990c7bae097224d90c28590a45405686" data-reference-type="commit" data-container="body" data-placement="top" title="CI: update build architectures" class="gfm gfm-commit has-tooltip">7928f7d3</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/ac03feb20f007a2448e120ba6971577ed0e65aee CI: Add --autoremove, ignore removal errors 2023-09-01T21:56:15+02:00 Jeffery To jeffery.to@gmail.com 836b4e1c734f9705bfd8db0da0c04214c2647932 added --force-removal-of-dependent-packages but it does not do what the commit message says it does. When package A depends on package B (package B is a dependency of package A; package A is a dependent of package B), trying to remove package B while package A is installed will result in an error. Adding --force-removal-of-dependent-packages in this case will cause the removal of package B and package A (package B's dependent). But in the case of the CI testing step, it is package A that is being installed and removed. Removing package A with --force-removal-of-dependent-packages will not cause package B (package A's dependency) to be removed. This adds --autoremove to actually remove the package's dependencies. This also ignores any errors returned by opkg remove as --autoremove can sometimes falsely return an error[1]. [1]: <a href="https://github.com/openwrt/openwrt/issues/12241" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openwrt/openwrt/issues/12241</a> Fixes: 836b4e1c734f ("github-ci: add --force-removal-of-dependent-packages") Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/53a53b8ee38d79083ff59e656798948f9b0a7e68" data-original="53a53b8ee38d79083ff59e656798948f9b0a7e68" data-link="false" data-link-reference="false" data-project="28801" data-commit="53a53b8ee38d79083ff59e656798948f9b0a7e68" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Add --autoremove, ignore removal errors" class="gfm gfm-commit has-tooltip">53a53b8e</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/9f7ba4a4b5028e5f7ab1d8abb9393e307b9ecc36 CI: Add local feed for CI-built packages 2023-09-01T21:56:26+02:00 Jeffery To jeffery.to@gmail.com To test each package, the CI-built target package (ipk) file is installed, but currently the target package's dependencies are installed from the standard opkg feeds. There are cases when the CI-built target packages should be installed/tested together: * If a pull request contains several new packages that depend on each other, the test step will fail as the new dependencies cannot be found in the current packages feed. * If a pull request upgrades a source package that builds several target packages that depend on each other, the test step may fail due to the version/ABI mismatch between a newer target package and the older dependencies installed from the packages feed. This sets up a local feed for the CI-built packages so that dependencies are also installed from the same set of packages. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/f818fe716ea126dd8240c9600f92e5b412d59060" data-original="f818fe716ea126dd8240c9600f92e5b412d59060" data-link="false" data-link-reference="false" data-project="28801" data-commit="f818fe716ea126dd8240c9600f92e5b412d59060" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Add local feed for CI-built packages" class="gfm gfm-commit has-tooltip">f818fe71</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/ca620495d34474765b4727576eb7164efc893e78 cache-domains: added pre-test.sh CI step 2023-09-01T21:56:39+02:00 Gerard Ryan G.M0N3Y.2503@gmail.com Some packages variants have conflicting dependencies with the base packages and the CI test will fail to install before anything can be done by the packages to setup the system for install. This change adds a pre-test.sh that runs before the install so things like the default libustream variant can be swapped out as shown in the updated cache-domains. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:G.M0N3Y.2503@gmail.com" title="G.M0N3Y.2503@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:G.M0N3Y.2503@gmail.com" title="G.M0N3Y.2503@gmail.com">Gerard Ryan</a> &lt;<a href="mailto:G.M0N3Y.2503@gmail.com" title="G.M0N3Y.2503@gmail.com">G.M0N3Y.2503@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/61997c86b01c83320a2cbb1b490941a8af741253" data-original="61997c86b01c83320a2cbb1b490941a8af741253" data-link="false" data-link-reference="false" data-project="28801" data-commit="61997c86b01c83320a2cbb1b490941a8af741253" data-reference-type="commit" data-container="body" data-placement="top" title="cache-domains: added pre-test.sh CI step" class="gfm gfm-commit has-tooltip">61997c86</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/86f308dcc751befc8af6f960fececb06d0e8ceec CI: Enable runtime_test for mips_24kc 2023-09-01T21:56:47+02:00 Van Waholtz brvphoenix@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:brvphoenix@gmail.com" title="brvphoenix@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg4" style="text-decoration: none">N</a><a href="mailto:brvphoenix@gmail.com" title="brvphoenix@gmail.com">Van Waholtz</a> &lt;<a href="mailto:brvphoenix@gmail.com" title="brvphoenix@gmail.com">brvphoenix@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/28d204148a7cad8f1ee903bf6af4dae234b28119" data-original="28d204148a7cad8f1ee903bf6af4dae234b28119" data-link="false" data-link-reference="false" data-project="28801" data-commit="28d204148a7cad8f1ee903bf6af4dae234b28119" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Enable runtime_test for mips_24kc" class="gfm gfm-commit has-tooltip">28d20414</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/4f115606ab18d64e1460508d9676c93f2e991ab5 CI: Run "apt-get update" before installing signify-openbsd 2023-09-01T21:56:58+02:00 Jeffery To jeffery.to@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg4" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/89cf0d561977c028b45e5ab6db1b34dab27b9a11" data-original="89cf0d561977c028b45e5ab6db1b34dab27b9a11" data-link="false" data-link-reference="false" data-project="28801" data-commit="89cf0d561977c028b45e5ab6db1b34dab27b9a11" data-reference-type="commit" data-container="body" data-placement="top" title='CI: Run "apt-get update" before installing signify-openbsd' class="gfm gfm-commit has-tooltip">89cf0d56</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/675248d9b7b36f4d25c8ed76846d18039bbf5f05 CI: Do package run-tests only if target packages were built 2023-09-01T21:57:15+02:00 Jeffery To jeffery.to@gmail.com Currently, the package run-test phase will fail for PRs that only add/update host-only packages, as no target packages (*.ipk) are built. This checks if any target packages are built before attempting the run-tests. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg3" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/299ee2b1cfd20a7c9d31e8024b4333e8da035af3" data-original="299ee2b1cfd20a7c9d31e8024b4333e8da035af3" data-link="false" data-link-reference="false" data-project="28801" data-commit="299ee2b1cfd20a7c9d31e8024b4333e8da035af3" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Do package run-tests only if target packages were built" class="gfm gfm-commit has-tooltip">299ee2b1</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/191f6c04236831d28fe26020c46c3702c865749d CI: add concurrency rules to skip redundant build 2023-09-01T21:57:23+02:00 Christian Marangi ansuelsmth@gmail.com Add concurrency rules to skip redundant build to skip extra build test on force push on pull request. Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg1" style="text-decoration: none">N</a><a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">Christian Marangi</a> &lt;<a href="mailto:ansuelsmth@gmail.com" title="ansuelsmth@gmail.com">ansuelsmth@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/5aa683be13c9b1f4a2bdb09ec0481b7cd546dd77" data-original="5aa683be13c9b1f4a2bdb09ec0481b7cd546dd77" data-link="false" data-link-reference="false" data-project="28801" data-commit="5aa683be13c9b1f4a2bdb09ec0481b7cd546dd77" data-reference-type="commit" data-container="body" data-placement="top" title="CI: add concurrency rules to skip redundant build" class="gfm gfm-commit has-tooltip">5aa683be</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/fa833a0d976448f61e42e91afd4af2811b2b0e73 CI: Sort build architectures in alphabetical order 2023-09-01T21:57:33+02:00 Jeffery To jeffery.to@gmail.com Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">Jeffery To</a> &lt;<a href="mailto:jeffery.to@gmail.com" title="jeffery.to@gmail.com">jeffery.to@gmail.com</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/06b7d9b665d6299571a305b49e1bc159290d16cd" data-original="06b7d9b665d6299571a305b49e1bc159290d16cd" data-link="false" data-link-reference="false" data-project="28801" data-commit="06b7d9b665d6299571a305b49e1bc159290d16cd" data-reference-type="commit" data-container="body" data-placement="top" title="CI: Sort build architectures in alphabetical order" class="gfm gfm-commit has-tooltip">06b7d9b6</a>) https://gitcode.net/mirror/openwrt/routing/-/commit/0b19771fb2dd81e7c428759610aed583171eed80 opennds: update to version 10.1.3 2023-09-03T09:48:17+02:00 Rob White rob@blue-wave.net Maintainer: Rob White rob@blue-wave.net Compile tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc, x86-64 Run tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc, x86-64; on snapshot, 23.05, 22.03 Description: opennds (10.1.3) Security Advisory. This version contains fixes for multiple potential security vulnerabilities Credit - Stanislav Dashevskyi - standash.github.io [standash] It also contains some minor bug fixes * Fix - Buffer overflow causing segfault - CVE-2023-41101 [bluewavenet] * Fix - Memory leaks due to passing allocated buffer into safe_asprintf() - CVE-2023-41102 [bluewavenet] * Fix - Remove deprecated preauth option [bluewavenet] * Fix - missing free in show_preauth_page if MHD does not respond [bluewavenet] * Fix - more safe_asprintf memory leaks [bluewavenet] * Fix - missing free for mark_auth [bluewavenet] * Fix - memory leak after starting authmon daemon [bluewavenet] * Fix - memory leak in encode_and_redirect_to_splashpage [bluewavenet] * Fix - Community themespec, voucher css and logo image [bluewavenet] * Fix - ThemeSpec, path to logo in page footer [bluewavenet] * Fix - ensure gatewayurl is urldecoded to fix broken css and images in themespec [bluewavenet] * Add - set default fas remote fqdn to disabled [bluewavenet] Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:rob@blue-wave.net" title="rob@blue-wave.net"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg1" style="text-decoration: none">N</a><a href="mailto:rob@blue-wave.net" title="rob@blue-wave.net">Rob White</a> &lt;<a href="mailto:rob@blue-wave.net" title="rob@blue-wave.net">rob@blue-wave.net</a>&gt;</span> (cherry picked from commit <a href="/mirror/openwrt/routing/-/commit/88c98c910acccab694b3afb6d36d70ca429118a6" data-original="88c98c910acccab694b3afb6d36d70ca429118a6" data-link="false" data-link-reference="false" data-project="28801" data-commit="88c98c910acccab694b3afb6d36d70ca429118a6" data-reference-type="commit" data-container="body" data-placement="top" title="opennds: update to version 10.1.3" class="gfm gfm-commit has-tooltip">88c98c91</a>)
name: Check autorelease deprecation
on:
pull_request_target:
types: [opened, synchronize, converted_to_draft, ready_for_review, edited]
jobs:
build:
name: Check autorelease deprecation
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Determine branch name
run: |
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
echo "Building for $BRANCH"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Determine changed packages
run: |
RET=0
# only detect packages with changes
PKG_ROOTS=$(find . -name Makefile | \
grep -v ".*/src/Makefile" | \
sed -e 's@./\(.*\)/Makefile@\1/@')
CHANGES=$(git diff --diff-filter=d --name-only origin/$BRANCH...)
for ROOT in $PKG_ROOTS; do
for CHANGE in $CHANGES; do
if [[ "$CHANGE" == "$ROOT"* ]]; then
if grep -q '$(AUTORELEASE)' "$ROOT/Makefile"; then
CONTAINS_AUTORELEASE+="$ROOT"
fi
break
fi
done
done
if [ -n "$CONTAINS_AUTORELEASE" ]; then
RET=1
cat > "$GITHUB_WORKSPACE/pr_comment.md" << EOF
Please do no longer set *PKG_RELEASE* to *AUTORELEASE* as the
feature is deprecated. Please use an integer instead. Below is a
list of affected packages including correct *PKG_RELEASE*:
EOF
fi
for ROOT in $CONTAINS_AUTORELEASE; do
echo -n " - ${ROOT}Makefile: PKG_RELEASE:=" >> "$GITHUB_WORKSPACE/pr_comment.md"
last_bump="$(git log --pretty=format:'%h %s' "$ROOT" |
grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' |
cut -f 1 -d ' ')"
if [ -n "$last_bump" ]; then
echo -n $(($(git rev-list --count "$last_bump..HEAD" "$ROOT") + 2)) >> "$GITHUB_WORKSPACE/pr_comment.md"
else
echo -n $(($(git rev-list --count HEAD "$ROOT") + 2)) >> "$GITHUB_WORKSPACE/pr_comment.md"
fi
echo >> "$GITHUB_WORKSPACE/pr_comment.md"
done
exit $RET
- name: Find Comment
uses: peter-evans/find-comment@v2
if: ${{ failure() }}
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
if: ${{ failure() }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: 'pr_comment.md'
edit-mode: replace
#!/bin/sh
# not enabling `errtrace` and `pipefail` since those are bash specific
set -o errexit # failing commands causes script to fail
set -o nounset # undefined variables causes script to fail
echo "src/gz packages_ci file:///ci" >> /etc/opkg/distfeeds.conf
FINGERPRINT="$(usign -F -p /ci/packages_ci.pub)"
cp /ci/packages_ci.pub "/etc/opkg/keys/$FINGERPRINT"
mkdir -p /var/lock/
opkg update
[ -n "$CI_HELPER" ] || CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
[ -n "${CI_HELPER:=''}" ] || CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
for PKG in /ci/*.ipk; do
tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
# package name including variant
PKG_NAME=$(sed -ne 's#^Package: \(.*\)$#\1#p' ./control)
# package version without release
......@@ -17,10 +26,24 @@ for PKG in /ci/*.ipk; do
echo "Testing package $PKG_NAME in version $PKG_VERSION from $PKG_SOURCE"
opkg install "$PKG"
export PKG_NAME PKG_VERSION CI_HELPER
PRE_TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/pre-test.sh
if [ -f "$PRE_TEST_SCRIPT" ]; then
echo "Use package specific pre-test.sh"
if sh "$PRE_TEST_SCRIPT" "$PKG_NAME" "$PKG_VERSION"; then
echo "Pre-test successful"
else
echo "Pre-test failed"
exit 1
fi
else
echo "No pre-test.sh script available"
fi
opkg install "$PKG"
TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/test.sh
if [ -f "$TEST_SCRIPT" ]; then
......@@ -35,5 +58,5 @@ for PKG in /ci/*.ipk; do
echo "No test.sh script available"
fi
opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove
opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove --autoremove || true
done
......@@ -11,7 +11,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
......
......@@ -3,6 +3,10 @@ name: Test Build
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Test ${{ matrix.arch }}
......@@ -11,44 +15,40 @@ jobs:
fail-fast: false
matrix:
include:
- arch: arc_archs
target: archs38-generic
runtime_test: false
- arch: aarch64_cortex-a53
target: mvebu-cortexa53
runtime_test: true
- arch: arm_cortex-a15_neon-vfpv4
target: armvirt-32
runtime_test: true
- arch: arm_cortex-a9_vfpv3-d16
target: mvebu-cortexa9
runtime_test: false
- arch: i386_pentium-mmx
target: x86-geode
runtime_test: true
- arch: mips_24kc
target: ath79-generic
runtime_test: false
runtime_test: true
- arch: powerpc_464fp
target: apm821xx-nand
runtime_test: false
- arch: powerpc_8540
- arch: powerpc_8548
target: mpc85xx-p1010
runtime_test: false
- arch: aarch64_cortex-a53
target: mvebu-cortexa53
runtime_test: true
- arch: arm_cortex-a15_neon-vfpv4
target: armvirt-32
runtime_test: true
- arch: i386_pentium-mmx
target: x86-geode
runtime_test: true
- arch: x86_64
target: x86-64
runtime_test: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
......@@ -77,28 +77,44 @@ jobs:
# fallback to test packages if nothing explicitly changes this is
# should run if other mechanics in packages.git changed
PACKAGES="${PACKAGES:-vim attendedsysupgrade-common bmon}"
PACKAGES="${PACKAGES:-bird2 cjdns olsrd}"
echo "Building $PACKAGES"
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
- name: Generate build keys
run: |
sudo apt-get update
sudo apt-get install -y signify-openbsd
signify-openbsd -G -n -c 'DO NOT USE - OpenWrt packages feed CI' -p packages_ci.pub -s packages_ci.sec
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "KEY_BUILD<<$EOF" >> $GITHUB_ENV
cat packages_ci.sec >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
- name: Build
uses: openwrt/gh-action-sdk@v4
uses: openwrt/gh-action-sdk@v5
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
FEEDNAME: packages_ci
INDEX: 1
KEY_BUILD: ${{ env.KEY_BUILD }}
- name: Move created packages to project dir
run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
run: cp bin/packages/${{ matrix.arch }}/packages_ci/* . || true
- name: Store packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch}}-packages
path: "*.ipk"
name: ${{env.ARCHIVE_NAME}}-packages
path: |
Packages
Packages.*
*.ipk
PKG-INFO
- name: Store logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch}}-logs
path: logs/
......@@ -106,19 +122,32 @@ jobs:
- name: Remove logs
run: sudo rm -rf logs/ || true
- name: Check if any packages were built
run: |
if [ -n "$(find . -maxdepth 1 -type f -name '*.ipk' -print -quit)" ]; then
echo "Found *.ipk files"
HAVE_IPKS=true
else
echo "No *.ipk files found"
HAVE_IPKS=false
fi
echo "HAVE_IPKS=$HAVE_IPKS" >> $GITHUB_ENV
- name: Register QEMU
if: ${{ matrix.runtime_test }}
if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
run: |
sudo docker run --rm --privileged aptman/qus -s -- -p
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support
sudo update-binfmts --import
- name: Build Docker container
if: ${{ matrix.runtime_test }}
if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
run: |
docker build -t test-container --build-arg ARCH .github/workflows/
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
- name: Test via Docker container
if: ${{ matrix.runtime_test }}
if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
run: |
docker run --rm -v $GITHUB_WORKSPACE:/ci test-container
From: Vladislav Efanov <VEfanov@ispras.ru>
Date: Fri, 26 May 2023 19:16:32 +0300
Subject: batman-adv: Broken sync while rescheduling delayed work
Syzkaller got a lot of crashes like:
KASAN: use-after-free Write in *_timers*
All of these crashes point to the same memory area:
The buggy address belongs to the object at ffff88801f870000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 5320 bytes inside of
8192-byte region [ffff88801f870000, ffff88801f872000)
This area belongs to :
batadv_priv->batadv_priv_dat->delayed_work->timer_list
The reason for these issues is the lack of synchronization. Delayed
work (batadv_dat_purge) schedules new timer/work while the device
is being deleted. As the result new timer/delayed work is set after
cancel_delayed_work_sync() was called. So after the device is freed
the timer list contains pointer to already freed memory.
Found by Linux Verification Center (linuxtesting.org) with syzkaller.
Fixes: f6badf9eb582 ("batman-adv: Distributed ARP Table - implement local storage")
Signed-off-by: Vladislav Efanov <VEfanov@ispras.ru>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/177ba85fb2d4ca2ecd30ca16803560e80e916fac
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -101,7 +101,6 @@ static void batadv_dat_purge(struct work
*/
static void batadv_dat_start_timer(struct batadv_priv *bat_priv)
{
- INIT_DELAYED_WORK(&bat_priv->dat.work, batadv_dat_purge);
queue_delayed_work(batadv_event_workqueue, &bat_priv->dat.work,
msecs_to_jiffies(10000));
}
@@ -819,6 +818,7 @@ int batadv_dat_init(struct batadv_priv *
if (!bat_priv->dat.hash)
return -ENOMEM;
+ INIT_DELAYED_WORK(&bat_priv->dat.work, batadv_dat_purge);
batadv_dat_start_timer(bat_priv);
batadv_tvlv_handler_register(bat_priv, batadv_dat_tvlv_ogm_handler_v1,
From: Sven Eckelmann <sven@narfation.org>
Date: Tue, 11 Jul 2023 11:46:30 +0200
Subject: batman-adv: compat: Use native kstrtox.h for 5.10.185
Upstream stable commit 6e2e551e39fd ("kernel.h: split out kstrtox() and
simple_strtox() to a separate header") backported the support for
linux/kstrtox.h. Unfortunately, the compat support via linux/kernel.h was
dropped and thus references to kstrtou64 caused build errors
batman-adv/net/batman-adv/gateway_common.c: In function ‘batadv_parse_throughput’:
batman-adv/net/batman-adv/gateway_common.c:55:15: error: implicit declaration of function ‘kstrtou64’ [-Werror=implicit-function-declaration]
55 | ret = kstrtou64(buff, 10, &lthroughput);
| ^~~~~~~~~
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/8924adbdf993cd0521f9d0024b43e3b23af5114f
--- a/compat-include/linux/kstrtox.h
+++ b/compat-include/linux/kstrtox.h
@@ -11,7 +11,8 @@
#define _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_
#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(5, 14, 0)
+#if (LINUX_VERSION_IS_GEQ(5, 10, 185) && LINUX_VERSION_IS_LESS(5, 11, 0)) || \
+ LINUX_VERSION_IS_GEQ(5, 14, 0)
#include_next <linux/kstrtox.h>
#else
#include <linux/kernel.h>
From: Remi Pommarel <repk@triplefau.lt>
Date: Fri, 28 Jul 2023 15:38:50 +0200
Subject: batman-adv: Do not get eth header before batadv_check_management_packet
If received skb in batadv_v_elp_packet_recv or batadv_v_ogm_packet_recv
is either cloned or non linearized then its data buffer will be
reallocated by batadv_check_management_packet when skb_cow or
skb_linearize get called. Thus geting ethernet header address inside
skb data buffer before batadv_check_management_packet had any chance to
reallocate it could lead to the following kernel panic:
Unable to handle kernel paging request at virtual address ffffff8020ab069a
Mem abort info:
ESR = 0x96000007
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x07: level 3 translation fault
Data abort info:
ISV = 0, ISS = 0x00000007
CM = 0, WnR = 0
swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000040f45000
[ffffff8020ab069a] pgd=180000007fffa003, p4d=180000007fffa003, pud=180000007fffa003, pmd=180000007fefe003, pte=0068000020ab0706
Internal error: Oops: 96000007 [#1] SMP
Modules linked in: ahci_mvebu libahci_platform libahci dvb_usb_af9035 dvb_usb_dib0700 dib0070 dib7000m dibx000_common ath11k_pci ath10k_pci ath10k_core mwl8k_new nf_nat_sip nf_conntrack_sip xhci_plat_hcd xhci_hcd nf_nat_pptp nf_conntrack_pptp at24 sbsa_gwdt
CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.15.42-00066-g3242268d425c-dirty #550
Hardware name: A8k (DT)
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : batadv_is_my_mac+0x60/0xc0
lr : batadv_v_ogm_packet_recv+0x98/0x5d0
sp : ffffff8000183820
x29: ffffff8000183820 x28: 0000000000000001 x27: ffffff8014f9af00
x26: 0000000000000000 x25: 0000000000000543 x24: 0000000000000003
x23: ffffff8020ab0580 x22: 0000000000000110 x21: ffffff80168ae880
x20: 0000000000000000 x19: ffffff800b561000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 00dc098924ae0032
x14: 0f0405433e0054b0 x13: ffffffff00000080 x12: 0000004000000001
x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
x8 : 0000000000000000 x7 : ffffffc076dae000 x6 : ffffff8000183700
x5 : ffffffc00955e698 x4 : ffffff80168ae000 x3 : ffffff80059cf000
x2 : ffffff800b561000 x1 : ffffff8020ab0696 x0 : ffffff80168ae880
Call trace:
batadv_is_my_mac+0x60/0xc0
batadv_v_ogm_packet_recv+0x98/0x5d0
batadv_batman_skb_recv+0x1b8/0x244
__netif_receive_skb_core.isra.0+0x440/0xc74
__netif_receive_skb_one_core+0x14/0x20
netif_receive_skb+0x68/0x140
br_pass_frame_up+0x70/0x80
br_handle_frame_finish+0x108/0x284
br_handle_frame+0x190/0x250
__netif_receive_skb_core.isra.0+0x240/0xc74
__netif_receive_skb_list_core+0x6c/0x90
netif_receive_skb_list_internal+0x1f4/0x310
napi_complete_done+0x64/0x1d0
gro_cell_poll+0x7c/0xa0
__napi_poll+0x34/0x174
net_rx_action+0xf8/0x2a0
_stext+0x12c/0x2ac
run_ksoftirqd+0x4c/0x7c
smpboot_thread_fn+0x120/0x210
kthread+0x140/0x150
ret_from_fork+0x10/0x20
Code: f9403844 eb03009f 54fffee1 f94
Thus ethernet header address should only be fetched after
batadv_check_management_packet has been called.
Fixes: 632835348e65 ("batman-adv: OGMv2 - add basic infrastructure")
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/670971ac7e9a47ee952848e0ea9128180e8fb991
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -506,7 +506,7 @@ int batadv_v_elp_packet_recv(struct sk_b
struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
struct batadv_elp_packet *elp_packet;
struct batadv_hard_iface *primary_if;
- struct ethhdr *ethhdr = (struct ethhdr *)skb_mac_header(skb);
+ struct ethhdr *ethhdr;
bool res;
int ret = NET_RX_DROP;
@@ -514,6 +514,7 @@ int batadv_v_elp_packet_recv(struct sk_b
if (!res)
goto free_skb;
+ ethhdr = eth_hdr(skb);
if (batadv_is_my_mac(bat_priv, ethhdr->h_source))
goto free_skb;
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -985,7 +985,7 @@ int batadv_v_ogm_packet_recv(struct sk_b
{
struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
struct batadv_ogm2_packet *ogm_packet;
- struct ethhdr *ethhdr = eth_hdr(skb);
+ struct ethhdr *ethhdr;
int ogm_offset;
u8 *packet_pos;
int ret = NET_RX_DROP;
@@ -999,6 +999,7 @@ int batadv_v_ogm_packet_recv(struct sk_b
if (!batadv_check_management_packet(skb, if_incoming, BATADV_OGM2_HLEN))
goto free_skb;
+ ethhdr = eth_hdr(skb);
if (batadv_is_my_mac(bat_priv, ethhdr->h_source))
goto free_skb;
From: Sven Eckelmann <sven@narfation.org>
Date: Wed, 19 Jul 2023 10:15:05 +0200
Subject: batman-adv: Trigger events for auto adjusted MTU
If an interface changes the MTU, it is expected that an NETDEV_PRECHANGEMTU
and NETDEV_CHANGEMTU notification events is triggered. This worked fine for
.ndo_change_mtu based changes because core networking code took care of it.
But for auto-adjustments after hard-interfaces changes, these events were
simply missing.
Due to this problem, non-batman-adv components weren't aware of MTU changes
and thus couldn't perform their own tasks correctly.
Fixes: 8009e9f7ac4f ("set bat0 MTU according to the MTUs of the hard interfaces")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/27c4d7c1c7fa39d71ea6ccf1c23bcb4773243800
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -626,7 +626,7 @@ out:
*/
void batadv_update_min_mtu(struct net_device *soft_iface)
{
- soft_iface->mtu = batadv_hardif_min_mtu(soft_iface);
+ dev_set_mtu(soft_iface, batadv_hardif_min_mtu(soft_iface));
/* Check if the local translate table should be cleaned up to match a
* new (and smaller) MTU.
From: Sven Eckelmann <sven@narfation.org>
Date: Wed, 19 Jul 2023 10:15:06 +0200
Subject: batman-adv: Don't increase MTU when set by user
If the user set an MTU value, it usually means that there are special
requirements for the MTU. But if an interface gots activated, the MTU was
always recalculated and then the user set value was overwritten.
The only reason why this user set value has to be overwritten, is when the
MTU has to be decreased because batman-adv is not able to transfer packets
with the user specified size.
Fixes: 88861ea9acb7 ("[batman-adv] replacing if up/down timer with kernel notifications")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/2745af592150b758ee96abf9329dd5f42cf22c25
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -626,7 +626,19 @@ out:
*/
void batadv_update_min_mtu(struct net_device *soft_iface)
{
- dev_set_mtu(soft_iface, batadv_hardif_min_mtu(soft_iface));
+ struct batadv_priv *bat_priv = netdev_priv(soft_iface);
+ int limit_mtu;
+ int mtu;
+
+ mtu = batadv_hardif_min_mtu(soft_iface);
+
+ if (bat_priv->mtu_set_by_user)
+ limit_mtu = bat_priv->mtu_set_by_user;
+ else
+ limit_mtu = ETH_DATA_LEN;
+
+ mtu = min(mtu, limit_mtu);
+ dev_set_mtu(soft_iface, mtu);
/* Check if the local translate table should be cleaned up to match a
* new (and smaller) MTU.
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -154,11 +154,14 @@ static int batadv_interface_set_mac_addr
static int batadv_interface_change_mtu(struct net_device *dev, int new_mtu)
{
+ struct batadv_priv *bat_priv = netdev_priv(dev);
+
/* check ranges */
if (new_mtu < 68 || new_mtu > batadv_hardif_min_mtu(dev))
return -EINVAL;
dev->mtu = new_mtu;
+ bat_priv->mtu_set_by_user = new_mtu;
return 0;
}
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1547,6 +1547,12 @@ struct batadv_priv {
struct net_device *soft_iface;
/**
+ * @mtu_set_by_user: MTU was set once by user
+ * protected by rtnl_lock
+ */
+ int mtu_set_by_user;
+
+ /**
* @bat_counters: mesh internal traffic statistic counters (see
* batadv_counters)
*/
From: Remi Pommarel <repk@triplefau.lt>
Date: Fri, 4 Aug 2023 11:39:36 +0200
Subject: batman-adv: Fix TT global entry leak when client roamed back
When a client roamed back to a node before it got time to destroy the
pending local entry (i.e. within the same originator interval) the old
global one is directly removed from hash table and left as such.
But because this entry had an extra reference taken at lookup (i.e using
batadv_tt_global_hash_find) there is no way its memory will be reclaimed
at any time causing the following memory leak:
unreferenced object 0xffff0000073c8000 (size 18560):
comm "softirq", pid 0, jiffies 4294907738 (age 228.644s)
hex dump (first 32 bytes):
06 31 ac 12 c7 7a 05 00 01 00 00 00 00 00 00 00 .1...z..........
2c ad be 08 00 80 ff ff 6c b6 be 08 00 80 ff ff ,.......l.......
backtrace:
[<00000000ee6e0ffa>] kmem_cache_alloc+0x1b4/0x300
[<000000000ff2fdbc>] batadv_tt_global_add+0x700/0xe20
[<00000000443897c7>] _batadv_tt_update_changes+0x21c/0x790
[<000000005dd90463>] batadv_tt_update_changes+0x3c/0x110
[<00000000a2d7fc57>] batadv_tt_tvlv_unicast_handler_v1+0xafc/0xe10
[<0000000011793f2a>] batadv_tvlv_containers_process+0x168/0x2b0
[<00000000b7cbe2ef>] batadv_recv_unicast_tvlv+0xec/0x1f4
[<0000000042aef1d8>] batadv_batman_skb_recv+0x25c/0x3a0
[<00000000bbd8b0a2>] __netif_receive_skb_core.isra.0+0x7a8/0xe90
[<000000004033d428>] __netif_receive_skb_one_core+0x64/0x74
[<000000000f39a009>] __netif_receive_skb+0x48/0xe0
[<00000000f2cd8888>] process_backlog+0x174/0x344
[<00000000507d6564>] __napi_poll+0x58/0x1f4
[<00000000b64ef9eb>] net_rx_action+0x504/0x590
[<00000000056fa5e4>] _stext+0x1b8/0x418
[<00000000878879d6>] run_ksoftirqd+0x74/0xa4
unreferenced object 0xffff00000bae1a80 (size 56):
comm "softirq", pid 0, jiffies 4294910888 (age 216.092s)
hex dump (first 32 bytes):
00 78 b1 0b 00 00 ff ff 0d 50 00 00 00 00 00 00 .x.......P......
00 00 00 00 00 00 00 00 50 c8 3c 07 00 00 ff ff ........P.<.....
backtrace:
[<00000000ee6e0ffa>] kmem_cache_alloc+0x1b4/0x300
[<00000000d9aaa49e>] batadv_tt_global_add+0x53c/0xe20
[<00000000443897c7>] _batadv_tt_update_changes+0x21c/0x790
[<000000005dd90463>] batadv_tt_update_changes+0x3c/0x110
[<00000000a2d7fc57>] batadv_tt_tvlv_unicast_handler_v1+0xafc/0xe10
[<0000000011793f2a>] batadv_tvlv_containers_process+0x168/0x2b0
[<00000000b7cbe2ef>] batadv_recv_unicast_tvlv+0xec/0x1f4
[<0000000042aef1d8>] batadv_batman_skb_recv+0x25c/0x3a0
[<00000000bbd8b0a2>] __netif_receive_skb_core.isra.0+0x7a8/0xe90
[<000000004033d428>] __netif_receive_skb_one_core+0x64/0x74
[<000000000f39a009>] __netif_receive_skb+0x48/0xe0
[<00000000f2cd8888>] process_backlog+0x174/0x344
[<00000000507d6564>] __napi_poll+0x58/0x1f4
[<00000000b64ef9eb>] net_rx_action+0x504/0x590
[<00000000056fa5e4>] _stext+0x1b8/0x418
[<00000000878879d6>] run_ksoftirqd+0x74/0xa4
Releasing the extra reference from batadv_tt_global_hash_find even at
roam back when batadv_tt_global_free is called fixes this memory leak.
Cc: stable@vger.kernel.org
Fixes: 2443ba383c7d ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/26fce59c70729e07034de966ac5fd2d5c1f2d597
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -774,7 +774,6 @@ check_roaming:
if (roamed_back) {
batadv_tt_global_free(bat_priv, tt_global,
"Roaming canceled");
- tt_global = NULL;
} else {
/* The global entry has to be marked as ROAMING and
* has to be kept for consistency purpose
From: Remi Pommarel <repk@triplefau.lt>
Date: Wed, 9 Aug 2023 17:29:13 +0200
Subject: batman-adv: Fix batadv_v_ogm_aggr_send memory leak
When batadv_v_ogm_aggr_send is called for an inactive interface, the skb
is silently dropped by batadv_v_ogm_send_to_if() but never freed causing
the following memory leak:
unreferenced object 0xffff00000c164800 (size 512):
comm "kworker/u8:1", pid 2648, jiffies 4295122303 (age 97.656s)
hex dump (first 32 bytes):
00 80 af 09 00 00 ff ff e1 09 00 00 75 01 60 83 ............u.`.
1f 00 00 00 b8 00 00 00 15 00 05 00 da e3 d3 64 ...............d
backtrace:
[<0000000007ad20f6>] __kmalloc_track_caller+0x1a8/0x310
[<00000000d1029e55>] kmalloc_reserve.constprop.0+0x70/0x13c
[<000000008b9d4183>] __alloc_skb+0xec/0x1fc
[<00000000c7af5051>] __netdev_alloc_skb+0x48/0x23c
[<00000000642ee5f5>] batadv_v_ogm_aggr_send+0x50/0x36c
[<0000000088660bd7>] batadv_v_ogm_aggr_work+0x24/0x40
[<0000000042fc2606>] process_one_work+0x3b0/0x610
[<000000002f2a0b1c>] worker_thread+0xa0/0x690
[<0000000059fae5d4>] kthread+0x1fc/0x210
[<000000000c587d3a>] ret_from_fork+0x10/0x20
Free the skb in that case to fix this leak.
Cc: stable@vger.kernel.org
Fixes: 632835348e65 ("batman-adv: OGMv2 - add basic infrastructure")
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/9024db261180f73fc687a9ecc7e79e3b0ccf50dc
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -123,8 +123,10 @@ static void batadv_v_ogm_send_to_if(stru
{
struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
- if (hard_iface->if_status != BATADV_IF_ACTIVE)
+ if (hard_iface->if_status != BATADV_IF_ACTIVE) {
+ kfree_skb(skb);
return;
+ }
batadv_inc_counter(bat_priv, BATADV_CNT_MGMT_TX);
batadv_add_counter(bat_priv, BATADV_CNT_MGMT_TX_BYTES,
From: Sven Eckelmann <sven@narfation.org>
Date: Mon, 21 Aug 2023 21:48:48 +0200
Subject: batman-adv: Hold rtnl lock during MTU update via netlink
The automatic recalculation of the maximum allowed MTU is usually triggered
by code sections which are already rtnl lock protected by callers outside
of batman-adv. But when the fragmentation setting is changed via
batman-adv's own batadv genl family, then the rtnl lock is not yet taken.
But dev_set_mtu requires that the caller holds the rtnl lock because it
uses netdevice notifiers. And this code will then fail the check for this
lock:
RTNL: assertion failed at net/core/dev.c (1953)
Cc: stable@vger.kernel.org
Reported-by: syzbot+f8812454d9b3ac00d282@syzkaller.appspotmail.com
Fixes: 27c4d7c1c7fa ("batman-adv: Trigger events for auto adjusted MTU")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/aeb35331aa9a17f9affd84c1a5b020aeb4a976f4
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -494,7 +494,10 @@ static int batadv_netlink_set_mesh(struc
attr = info->attrs[BATADV_ATTR_FRAGMENTATION_ENABLED];
atomic_set(&bat_priv->fragmentation, !!nla_get_u8(attr));
+
+ rtnl_lock();
batadv_update_min_mtu(bat_priv->soft_iface);
+ rtnl_unlock();
}
if (info->attrs[BATADV_ATTR_GW_BANDWIDTH_DOWN]) {
......@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=opennds
PKG_VERSION:=10.1.2
PKG_VERSION:=10.1.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/opennds/opennds/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=818c24a8704e584665b493857086bccc3c55629977841ddffc185f7d082ef279
PKG_HASH:=8016a8d20643a2dfc7e8d9e8012e300db6996aeede5ea8a895cb1b95e52f202a
PKG_BUILD_DIR:=$(BUILD_DIR)/openNDS-$(PKG_VERSION)
PKG_MAINTAINER:=Rob White <rob@blue-wave.net>
......