From daacfa70716ce48f172862ae987c661a8cb4ef36 Mon Sep 17 00:00:00 2001 From: woOzZ2 <21095700+woOzZ2@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:05:01 +0800 Subject: [PATCH 1/2] base-files: fix OpenWrt with Docker will cause NAT loopback (#11588) Fixed the problem that even if br-netfilter is disabled in package/kernel/linux/files/sysctl-br-netfilter.conf, NAT loopback will still fail. This applies to OpenWrt with Docker --- package/base-files/files/etc/sysctl.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf index ae04212f420b18..1d9efdf503e01a 100644 --- a/package/base-files/files/etc/sysctl.conf +++ b/package/base-files/files/etc/sysctl.conf @@ -1 +1,6 @@ # Defaults are configured in /etc/sysctl.d/* and can be customized in this file + +# disable bridge firewalling.(Fixed the problem that even if br-netfilter is disabled in package/kernel/linux/files/sysctl-br-netfilter.conf, NAT loopback will still fail. This applies to OpenWrt with Docker) +net.bridge.bridge-nf-call-arptables = 0 +net.bridge.bridge-nf-call-ip6tables = 0 +net.bridge.bridge-nf-call-iptables = 0 From 8c39e485143d933d24cc4d9feee02534ea6a502f Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Tue, 29 Aug 2023 23:09:06 +0800 Subject: [PATCH 2/2] base-files: create empty coremark file Fixes: #11590 --- package/base-files/files/etc/sysctl.conf | 1 - package/base-files/files/lib/preinit/80_mount_root | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf index 1d9efdf503e01a..e784353dcb33c8 100644 --- a/package/base-files/files/etc/sysctl.conf +++ b/package/base-files/files/etc/sysctl.conf @@ -1,6 +1,5 @@ # Defaults are configured in /etc/sysctl.d/* and can be customized in this file -# disable bridge firewalling.(Fixed the problem that even if br-netfilter is disabled in package/kernel/linux/files/sysctl-br-netfilter.conf, NAT loopback will still fail. This applies to OpenWrt with Docker) net.bridge.bridge-nf-call-arptables = 0 net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root index 788a6ba47951b7..e78fb867349240 100644 --- a/package/base-files/files/lib/preinit/80_mount_root +++ b/package/base-files/files/lib/preinit/80_mount_root @@ -17,10 +17,7 @@ missing_lines() { do_mount_root() { mount_root boot_run_hook preinit_mount_root - have_ro_ext4=$(/bin/cat /proc/mounts |/bin/grep ' / ext4'|/bin/grep 'ro'|/usr/bin/wc -l) - if [ "$have_ro_ext4" != "0" ]; then - /usr/bin/mount -o remount,rw,noatime / - fi + [ ! -f /etc/bench.log ] && touch /etc/bench.log [ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && { echo "- config restore -" cp /etc/passwd /etc/group /etc/shadow /tmp