summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2018-04-06 11:07:29 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-04-09 10:26:16 +0200
commitc951bf3775a3b65c28e661f91a40d57e40bc2640 (patch)
treeb29ac3804334b60a80670dd4174002fd594ae958
parent86aeee28e5b076617126e568c5dc11d4d60d1482 (diff)
downloadptxdist-c951bf3775a3b65c28e661f91a40d57e40bc2640.tar.gz
ptxdist-c951bf3775a3b65c28e661f91a40d57e40bc2640.tar.xz
nftables: Add example config file
This adds only empty chains, but it will be needed for the bbinit startscript not to fail. User will probably overwrite it with something more useful. Signed-off-by: Alexander Dahl <ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xprojectroot/etc/nftables.conf15
-rw-r--r--rules/nftables.make1
2 files changed, 16 insertions, 0 deletions
diff --git a/projectroot/etc/nftables.conf b/projectroot/etc/nftables.conf
new file mode 100755
index 000000000..2c09327d7
--- /dev/null
+++ b/projectroot/etc/nftables.conf
@@ -0,0 +1,15 @@
+#!/usr/sbin/nft -f
+
+flush ruleset
+
+table filter {
+ chain input {
+ type filter hook input priority 0;
+ }
+ chain forward {
+ type filter hook forward priority 0;
+ }
+ chain output {
+ type filter hook output priority 0;
+ }
+}
diff --git a/rules/nftables.make b/rules/nftables.make
index 74828a2e9..7645784dd 100644
--- a/rules/nftables.make
+++ b/rules/nftables.make
@@ -56,6 +56,7 @@ $(STATEDIR)/nftables.targetinstall:
@$(call install_fixup, nftables,DESCRIPTION,missing)
@$(call install_copy, nftables, 0, 0, 0755, -, /usr/sbin/nft)
+ @$(call install_alternative, nftables, 0, 0, 0755, /etc/nftables.conf)
@$(call install_finish, nftables)