Skip to content

Commit

Permalink
base-files: move netfilter sysctl defaults to specific kmod packages
Browse files Browse the repository at this point in the history
Avoid warnings when applying settings for uninstalled kmods. See also
FS#1073.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  • Loading branch information
neocturne committed Apr 13, 2018
1 parent bee696d commit 445682c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
12 changes: 0 additions & 12 deletions package/base-files/files/etc/sysctl.d/10-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions package/kernel/linux/files/sysctl-br-netfilter.conf
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions package/kernel/linux/files/sysctl-nf-conntrack.conf
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions package/kernel/linux/modules/netfilter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down Expand Up @@ -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))


Expand Down

0 comments on commit 445682c

Please sign in to comment.