diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2015-09-15 15:42:22 +0000 |
---|---|---|
committer | Eivind Uggedal <eivind@uggedal.com> | 2015-09-15 15:48:25 +0000 |
commit | 1ab972294e757a1e38b1123f023e96a94cb409fb (patch) | |
tree | 348debb9b0f043e49c62bfc209b96eab19ef4e15 | |
parent | 2a866db42b298ebc0b7d3b5640619e9788d4d135 (diff) | |
download | aports-1ab972294e757a1e38b1123f023e96a94cb409fb.tar.bz2 aports-1ab972294e757a1e38b1123f023e96a94cb409fb.tar.xz |
main/nftables: moved from testing
Since linux 3.18 the elaborate clear logic is no longer needed. Replace
it with the safer:
nft flush ruleset
-rw-r--r-- | main/nftables/01-fix-object-order-via-nft--f.patch (renamed from testing/nftables/01-fix-object-order-via-nft--f.patch) | 0 | ||||
-rw-r--r-- | main/nftables/APKBUILD (renamed from testing/nftables/APKBUILD) | 14 | ||||
-rw-r--r-- | main/nftables/nftables.confd (renamed from testing/nftables/nftables.confd) | 2 | ||||
-rw-r--r-- | main/nftables/nftables.initd (renamed from testing/nftables/nftables.initd) | 20 |
4 files changed, 10 insertions, 26 deletions
diff --git a/testing/nftables/01-fix-object-order-via-nft--f.patch b/main/nftables/01-fix-object-order-via-nft--f.patch index 6092032c5a..6092032c5a 100644 --- a/testing/nftables/01-fix-object-order-via-nft--f.patch +++ b/main/nftables/01-fix-object-order-via-nft--f.patch diff --git a/testing/nftables/APKBUILD b/main/nftables/APKBUILD index 0679b5bac2..d7971bf4a4 100644 --- a/testing/nftables/APKBUILD +++ b/main/nftables/APKBUILD @@ -6,7 +6,7 @@ pkgrel=0 pkgdesc="Netfilter tables userspace tools" url="http://netfilter.org/projects/nftables/" arch="all" -license="GPL2" +license="GPL-2" depends="" depends_dev="libmnl-dev libnftnl-dev gmp-dev readline-dev ncurses-dev" makedepends="$depends_dev bison flex" @@ -57,14 +57,14 @@ package() { } md5sums="09b686c489ff10db670ca60dbed7ff43 nftables-0.4.tar.bz2 -00f7dc61bcc1f7c2e48ebeaeb8b6b6b5 nftables.confd -f5703f86eb2129cdece8c230cc036bd7 nftables.initd +52273a548f7cbfe17ba9ba97b10cf685 nftables.confd +63e330d514aed839ce9985c3cb918e2c nftables.initd c0a18f43a5ce02cb61c9e0071725529a 01-fix-object-order-via-nft--f.patch" sha256sums="f6ca69b75c68915f9f3a3972274ec68354dfbbcfc0b9fc55c813a0525c351d3c nftables-0.4.tar.bz2 -d5e3077345dfea02849a70aea220396322a10c3808f0303b988119adbc56fdbd nftables.confd -293d5a0ef687c69fffdce912a833cf5812272c0baae9f59d603ada8efa5828a6 nftables.initd +8f09ab3f86f326d3b78dca50db0bfdde2d8bf5e5d45e3495a836edebe99ec2ff nftables.confd +787873899c07c74e8d26731922df2d26ecb98e1c2e2ca9cdf2450f85621730ff nftables.initd ab5068a30e4a0df72b589aec500a4a6a1c3a5ab50ee73fad034eee676eabe9bb 01-fix-object-order-via-nft--f.patch" sha512sums="0932cf987da602285fbf7c7f61328b0d74d687889c2d4a5bd2bd7fe11e8b99433bc5ee53ebbddadf2c90e40acdcb28f6babf07e11feedff815c571c3b782dffc nftables-0.4.tar.bz2 -8370abcdc89fcd9da5dc7d1620be6afb4633b8bcd0a8a120b464cc1a7e1fab6f34956c293da3f6d3cbe1f7a2e03038fd0c94a614137ae5657d29ffdb5f3fa144 nftables.confd -ec43cc630b45ea2726044b30925e04f16fdb48ff2ee1871c112fde5b406f47c75b53ce05db4dfab8558156da96e9bf484ebab1f00f5cda20bbe8597c63b178fe nftables.initd +f709e203d949380dce8ffdaed616c047280d3fe7448bb024a6f6c01a17c11bf7caaa5f67b412bc90c9bff4ce91a6fd5e5270d259dc30fdcda81dd2f6221ad0d8 nftables.confd +c99ecc03b19615aa53c6b8dbec2b2006b28b8f44817e08a30a48970c100f40877cfb6c214eb6b36b6cd0517a0e07d07f1157d930661a31ac46fbc2ec0d3a502d nftables.initd 9b7b51c55681fc25bb53fef6bf38e125377a3b32bdf6e9c8c7056a72deb7f24b7b6e2dcccb3065645e69675848585c6051e8992d9179f1609fbe1d873cb3bddf 01-fix-object-order-via-nft--f.patch" diff --git a/testing/nftables/nftables.confd b/main/nftables/nftables.confd index e83a4b9620..8048a2ad8e 100644 --- a/testing/nftables/nftables.confd +++ b/main/nftables/nftables.confd @@ -1,6 +1,6 @@ # /etc/conf.d/nftables -# Location in which nftables initscript will save set rules on +# Location in which nftables initscript will save set rules on # service shutdown NFTABLES_SAVE="/var/lib/nftables/rules-save" diff --git a/testing/nftables/nftables.initd b/main/nftables/nftables.initd index c726393056..211ed73ee3 100644 --- a/testing/nftables/nftables.initd +++ b/main/nftables/nftables.initd @@ -1,4 +1,4 @@ -#!/sbin/runscript +#!/sbin/openrc-run # Copyright 2014 Nicholas Vinson # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 @@ -40,23 +40,7 @@ getfamilies() { } clearNFT() { - local l3f line table chain - - for l3f in $(getfamilies); do - nft list tables ${l3f} | while read line; do - table=$(echo ${line} | sed "s/table[ \t]*//") - nft flush table ${l3f} ${table} - nft list table ${l3f} ${table} | while read l; do - chain=$(echo $l | grep -o 'chain [^[:space:]]\+' |\ - cut -d ' ' -f2) - if [ -n "${chain}" ]; then - nft flush chain ${l3f} ${table} ${chain} - nft delete chain ${l3f} ${table} ${chain} - fi - done - nft delete table ${l3f} ${table} - done - done + nft flush ruleset } addpanictable() { |