[arch-commits] Commit in nftables/trunk (PKGBUILD nftables-flush)

Sébastien Luttringer seblu at archlinux.org
Wed Aug 20 09:48:12 UTC 2014


    Date: Wednesday, August 20, 2014 @ 11:48:12
  Author: seblu
Revision: 220267

upgpkg: nftables 1:0.3-2

- fix flush script

Modified:
  nftables/trunk/PKGBUILD
  nftables/trunk/nftables-flush

----------------+
 PKGBUILD       |    4 ++--
 nftables-flush |   14 ++++++++------
 2 files changed, 10 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-08-20 09:21:14 UTC (rev 220266)
+++ PKGBUILD	2014-08-20 09:48:12 UTC (rev 220267)
@@ -4,7 +4,7 @@
 pkgname=nftables
 epoch=1
 pkgver=0.3
-pkgrel=1
+pkgrel=2
 pkgdesc='Netfilter tables userspace tools'
 arch=('i686' 'x86_64')
 url='http://netfilter.org/projects/nftables/'
@@ -20,7 +20,7 @@
           'SKIP'
           '041027cc0c217a5efa6b513a75736e28ab6db076'
           'a9021dd71f55f985a146f26a8ec66d4e15949978'
-          '194e4ab55f4b001396143f333988300541668e70')
+          'e04e980a79159acb5e7c27b23c39323b8c415e3f')
 
 build() {
   cd $pkgname-$pkgver

Modified: nftables-flush
===================================================================
--- nftables-flush	2014-08-20 09:21:14 UTC (rev 220266)
+++ nftables-flush	2014-08-20 09:48:12 UTC (rev 220267)
@@ -19,12 +19,14 @@
 PROTOS=(ip ip6 inet arp bridge)
 
 for proto in "${PROTOS[@]}"; do
-	nft list tables "$proto"|cut -f 2 -d ' '| while read table; do
-		nft list table ip6 filter|awk '/^[ \t]+chain/{ print $2 }'|while read chain; do
-			nft delete chain "$proto" "$table" "$chain"
-		done
-		nft delete table "$proto" "$table"
-	done
+  nft list tables "$proto"|cut -f 2 -d ' '| while read table; do
+    nft flush table "$proto" "$table"
+    # flush remove rules and not chain (despite man page). do it manually.
+    nft list table "$proto" filter|awk '/^[ \t]+chain/{ print $2 }'|while read chain; do
+      nft delete chain "$proto" "$table" "$chain"
+    done
+    nft delete table "$proto" "$table"
+  done
 done
 
 # vim:set ts=2 sw=2 et:




More information about the arch-commits mailing list