A new function "get_linux_version()" to normalize and print the
kernel version as an integer. In some migration scripts, it is
useful for checking the Linux kernel version.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19172
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit a0fe3cfb62fbf0b5f599c90e488727f493223429)
Link: https://github.com/openwrt/openwrt/pull/20739
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 42ca1612a2e207d47400d4bbbd4188a1cbc96b22)
Add new option to be able to perform upgrade on current partition for dual firmware devices:
"-s stay on current partition (for dual firmware devices)"
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14720
Link: https://github.com/openwrt/openwrt/pull/20086
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit e0478edeedccd10164b99cdba915776fcc6843c4)
A feed might provide the new wifi-scripts package that moved the wifi
script files to a dedicated package.
Add support for this by tweaking base-files package and check if
wifi-scripts is getting compiled. In such case, remove the base-files
file in favor of feed package.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Netifd is not longer responsible for configuring the gateway. The TR181 components took over this task.
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
- Remove syslog-ng config option that creates a logrotate conf. This
option was causing a duplicate config error in syslog.
- Remove the script from base-files that adds logrotate cron job.
- Add logrotate package. It was selected by the removed config options
before.
- Adapt logrotate test to include separated logs
Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be>
Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
(cherry picked from commit c13ed76075b78604eb21213e1842465cea35f3ea)
We've now prplOS version available, so lets make it available in build
artifacts as well.
References: PCF-691
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 8cf5efccf9ec8cdb5b1e9baad6f14b2dbf40e8a8)
Currently two IPv6 related tests ipv6_app_114 (FTP) and ipv6_app_124
(TFTP) fails due to disabled automatic conntrack helper, so fix it by
enabling it explicitly.
Fixes: PCF-840
References: PCF-671
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 4b76442e50b28ce19de1278c3d3451eaede7aa48)
(cherry picked from commit 1d6070b9acbe731273fcf3534e97fec7adc11a38)
I've just discovered broken networking on x86/64 QEMU target due to
changes introduced in commit 484946872ee6 ("base-files: board.d: add
guest bridge to default network config"), where guest bridge touches
network configuration and thanks to that x86/64 QEMU is not getting
default network configuration applied, which creates incomplete network
configuration. So fix it by moving guest bridge configuration past
default network configuration.
Fixes: 484946872ee6 ("base-files: board.d: add guest bridge to default network config")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit f8d96184e88c2eb226682a6c72b98eabaa0caf3d)
(cherry picked from commit 8e6657045d00cfa45ddbcc380389a37c8094b2b5)
Backport cron job setup from commit fb0a7d7bcc84 ("profiles: prpl: fix
various issues in syslog-ng and tr069-manager").
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 2a93b4289725466a1bab6b815afcf3ed7c93a0c4)
With the recent addition of several kernel module dependencies needed by
tr181-qos manager we've started experiencing issues with command prompt
detection in labgrid's shelldriver component.
It's likely related to longer kernel module loading times, which is then
having impact on delayed and longer kernel messages output on serial
console, thus interleaving labgrid command markers with kernel messages
and causing command prompt detection unreliable.
Current serial console loglevel is set to debug log level (KERN_DEBUG=7)
which makes kernel output very verbose and in some corner cases it's
causing interleaving of messages on serial console which makes currently
controlling of the DUT via labgrid framework very unreliable.
Fixing this properly via PCF-617 upstream in the labgrid framework is
going to take some time, so as a temporary workaround we're going to
decrease default kernel log level to warning (KERN_WARNING=4) which
limits kernel log output to the serial console a lot. Those kernel log
messages are not lost, they're still available in syslog's messages log
file.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit c57924854a129013bc8ba646b6953bf65baae255)
(cherry picked from commit fdf99433f1503da01dac50f3c3f7670e0f441738)
It was decided to rename project name from prplWrt to prplOS, so change
default hostname to prplOS as well.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit c7f349bb00021f768f660d3de0b36f08f4d36c96)
(cherry picked from commit d26279279e70fc4316172ba3b0a9bc87d82ca844)
Project was renamed in 8/2021 so let's update the welcome banner as well.
Closes PCF-639
Signed-off-by: Olaf Wachendorf <olaf.wachendorf@maxlinear.com>
(cherry picked from commit a03b397f687d95415433d09caa28695e40059414)
(cherry picked from commit 24a271688f57bc16f9b2936ad54891bba10b6ddf)
It was decided, that prplOS should ship with guest bridge in default
config.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 484946872ee642fe0edff433857cad19c34d165b)
(cherry picked from commit 9c3661be648ed133a717f97d8ec0e94a4382d0f7)
cdrouter_firewall_508: Verify outbound packets are not forwarded if the
source address is not a prefix of the interior network
This test ensures that the random martian address assigned to the LAN
client in step 2 is outside of lanIp/lanMask, does not match any static
routes configured with staticRouteLanNetwork and is not within any of
the following reserved IP ranges: 0.0.0.0/8,
127.0.0.0/8, 169.254.0.0/16, 192.88.99.0/24, 224.0.0.0/4,
240.0.0.0/4, 255.255.255.255/32.
Make the test pass by setting `rp_filter` to strict mode. Strict mode as
defined in RFC3704 Strict Reverse Path Each incoming packet is tested
against the FIB and if the interface is not the best reverse path the
packet check will fail. By default failed packets are discarded.
Current recommended practice in RFC3704 is to enable strict mode to
prevent IP spoofing from DDos attacks. If using asymmetric routing or
other complicated routing, then loose mode is recommended.
References: PCF-548
References: https://tools.ietf.org/html/rfc3704
References: https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b9ad7cbf75a4a99b22ef0906d8a76d7b71a8df97)
(cherry picked from commit 4a593e72e3b4751074311f1d1f3607b13d5d9128)
`$(( ))` will convert uninitialized variable to "0". If we want to
use "-n" to check the string length, it's necessary to make sure the
converted variable is not empty.
Fixes: 652a6677d5 ("base-files: Add new functions for ath11k caldata")
Fixes: https://github.com/openwrt/openwrt/issues/17818
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 094b6f593fb4943005e13e2f8581e66bb7c2c8cf)
Spaces and tabs are widely used in variable definitions. We have to
remove them to ensure that get_mac_ascii() works properly.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17262
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 551e04f3c9c063d885ca7a91db36f27f684a3a5c)
The function get_mac_ascii() will fail when there are two or more
same MAC address variable names in the mtd partition. Only retain
the first variable to workaround this rare situation.
Fixes: https://github.com/openwrt/openwrt/issues/17236
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17262
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3410ad2f40c085e5db7a71f6ae4b80734826a1e3)
It seems that we have some kind of a symbol name conflict which causes
CONFIG_SECCOMP to always be read as y.
Unfortunatelly, I could not figure out what is causing this, but simply
renaming SECCOMP to USE_SECCOMP seems to properly work and leaves the
symbol unset unless arch dependencies are satisfied.
This fixes qoriq and others that dont support seccomp from failing due
to procd-seccomp package being selected to get included but it cannot be
built for them:
ERROR: unable to select packages:
procd-seccomp (no such package):
required by: base-files-1637~52b6c92479[procd-seccomp]
Fixes: 4c65359af49b ("build: fix including busybox, procd and apk/opkg in imagebuilder")
Link: https://github.com/openwrt/openwrt/pull/17048
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit a48ec449ccab0069e84a72837bf06ba543e53aec)
Since the image builder pulls package lists from metadata directly,
add procd and busybox as depdendencies to base-files.
As for the package manager itself, since it can be disabled it needs
to be added directly in the image builder makefile
Fixes: 44598c233dd9 ("build: remove broken dependency of metadata on toplevel .config variables")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 4c65359af49b6ccecd98987f842db5eba985f64b)
Allows a running servie to manage its own data if untouched by the init script
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8c5826b140b6288b9270d232ecda0d540e380d4e)