firewall: properly unset position for delete command, fixes rule removal in ifdown
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 5 May 2010 15:50:21 +0000 (15:50 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 5 May 2010 15:50:21 +0000 (15:50 +0000)
SVN-Revision: 21378

package/firewall/files/lib/fw.sh

index c06e864..72aa37c 100644 (file)
@@ -150,8 +150,8 @@ fw__exec() { # <action> <family> <table> <chain> <target> <position> { <rules> }
 
        if [ $# -gt 0 ]; then
                shift
-               if [ $cmd == del ]; then
-                       pos=-
+               if [ $cmd == delete ]; then
+                       pos=
                fi
        fi
        while [ $# -gt 1 ]; do