diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-01-22 10:09:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-01-22 10:09:44 +0000 |
commit | 09351e78166b5e864197c4456ebae3f89dd0bed9 (patch) | |
tree | 41a96399f56ed3aa399006871bfce4430db84aa2 /net-firewall/nftables/files | |
parent | c8a77dfe4d3d307c1d5dd2650b7297447d8b609d (diff) |
gentoo resync : 22.01.2019
Diffstat (limited to 'net-firewall/nftables/files')
-rw-r--r-- | net-firewall/nftables/files/libexec/nftables-mk.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net-firewall/nftables/files/libexec/nftables-mk.sh b/net-firewall/nftables/files/libexec/nftables-mk.sh index b6ad37867b6d..b3d7db60d7fe 100644 --- a/net-firewall/nftables/files/libexec/nftables-mk.sh +++ b/net-firewall/nftables/files/libexec/nftables-mk.sh @@ -13,7 +13,8 @@ main() { nft ${SAVE_OPTIONS} list ruleset ;; "load") - ( echo "flush ruleset;"; cat "${NFTABLES_SAVE}" ) | nft -f - + # We use an include because cat fails with long rulesets see #675188 + printf 'flush ruleset\ninclude "%s"\n' "${NFTABLES_SAVE}" | nft -f - ;; "panic") panic hard | nft -f - @@ -25,8 +26,7 @@ main() { local tmp_save="${NFTABLES_SAVE}.tmp" umask 600; ( - echo "#!/sbin/nft -f" - echo "flush ruleset;" + printf '#!/sbin/nft -f\nflush ruleset\n' nft ${SAVE_OPTIONS} list ruleset ) > "$tmp_save" && mv ${tmp_save} ${NFTABLES_SAVE} ;; @@ -37,6 +37,7 @@ panic() { local erule; [ "$1" = soft ] && erule="ct state established,related accept;" || erule=""; cat <<EOF +flush ruleset table inet filter { chain input { type filter hook input priority 0; |