base-files: move netfilter sysctl defaults to specific kmod packages
authorMatthias Schiffer <mschiffer@universe-factory.net>
Thu, 12 Apr 2018 15:57:44 +0000 (17:57 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 13 Apr 2018 08:16:45 +0000 (10:16 +0200)
Avoid warnings when applying settings for uninstalled kmods. See also
FS#1073.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
package/base-files/Makefile
package/base-files/files/etc/sysctl.d/10-default.conf
package/kernel/linux/files/sysctl-br-netfilter.conf [new file with mode: 0644]
package/kernel/linux/files/sysctl-nf-conntrack.conf [new file with mode: 0644]
package/kernel/linux/modules/netfilter.mk

index 37f0e1e2fd4862a77e90e079b01d4816fefd028f..f35b4db79b757ecce4b7ff859e4236851d19f626 100644 (file)
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=186
+PKG_RELEASE:=187
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
index 7c3344dba339514c023c3b13c592e9ce9ca1ff55..98867b7c7ba1d1ce181f721cdfd17517069fcdf2 100644 (file)
@@ -20,15 +20,3 @@ net.ipv4.tcp_dsack=1
 
 net.ipv6.conf.default.forwarding=1
 net.ipv6.conf.all.forwarding=1
-
-net.netfilter.nf_conntrack_acct=1
-net.netfilter.nf_conntrack_checksum=0
-net.netfilter.nf_conntrack_max=16384
-net.netfilter.nf_conntrack_tcp_timeout_established=7440
-net.netfilter.nf_conntrack_udp_timeout=60
-net.netfilter.nf_conntrack_udp_timeout_stream=180
-
-# disable bridge firewalling by default
-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/kernel/linux/files/sysctl-br-netfilter.conf b/package/kernel/linux/files/sysctl-br-netfilter.conf
new file mode 100644 (file)
index 0000000..b10ddc0
--- /dev/null
@@ -0,0 +1,7 @@
+# Do not edit, changes to this file will be lost on upgrades
+# /etc/sysctl.conf can be used to customize sysctl settings
+
+# disable bridge firewalling by default
+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/kernel/linux/files/sysctl-nf-conntrack.conf b/package/kernel/linux/files/sysctl-nf-conntrack.conf
new file mode 100644 (file)
index 0000000..37baf5f
--- /dev/null
@@ -0,0 +1,9 @@
+# Do not edit, changes to this file will be lost on upgrades
+# /etc/sysctl.conf can be used to customize sysctl settings
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=7440
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
index 99c24cc0420a0a1526759af2a9354b1b389376b3..51f3544ed6d040735e136082cabf000eda9e0508 100644 (file)
@@ -101,6 +101,11 @@ define KernelPackage/nf-conntrack
   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK-m)))
 endef
 
+define KernelPackage/nf-conntrack/install
+       $(INSTALL_DIR) $(1)/etc/sysctl.d
+       $(INSTALL_DATA) ./files/sysctl-nf-conntrack.conf $(1)/etc/sysctl.d/11-nf-conntrack.conf
+endef
+
 $(eval $(call KernelPackage,nf-conntrack))
 
 
@@ -774,6 +779,11 @@ define KernelPackage/br-netfilter
   AUTOLOAD:=$(call AutoProbe,br_netfilter)
 endef
 
+define KernelPackage/br-netfilter/install
+       $(INSTALL_DIR) $(1)/etc/sysctl.d
+       $(INSTALL_DATA) ./files/sysctl-br-netfilter.conf $(1)/etc/sysctl.d/11-br-netfilter.conf
+endef
+
 $(eval $(call KernelPackage,br-netfilter))