From f9918b0da8c980b7702d42e56977775451fcaa73 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 8 Feb 2003 20:44:00 +0000 Subject: [PATCH] Correct rule number calculation in 'shorewall add' code git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@436 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 3 +++ Shorewall/firewall | 10 +++++----- Shorewall/install.sh | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 837f5b3d1..cfeb3947e 100755 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -17,3 +17,6 @@ Changes since 1.3.13 7. Updated copyrights for 2003. 8. Added support for openvpn tunnels on arbitrary ports + +9. Corrected rule number calculation problem in 'shorewall add' command + processing. diff --git a/Shorewall/firewall b/Shorewall/firewall index e080b1586..80a4adac3 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -4273,15 +4273,15 @@ add_to_zone() # $1 = [:] $2 = zone rulenum=2 fi - if ! list_search $interface $filterping_interfaces; then + if list_search $interface $filterping_interfaces; then rulenum=$(($rulenum + 1)) fi - if ! list_search $interface $maclist_interfaces; then + if list_search $interface $maclist_interfaces; then rulenum=$(($rulenum + 1)) fi - if ! list_search $interface $tcpflags_interfaces; then + if list_search $interface $tcpflags_interfaces; then rulenum=$(($rulenum + 1)) fi @@ -4306,11 +4306,11 @@ add_to_zone() # $1 = [:] $2 = zone rulenum=2 fi - if ! list_search $interface $maclist_interfaces; then + if list_search $interface $maclist_interfaces; then rulenum=$(($rulenum + 1)) fi - if ! list_search $interface $tcpflags_interfaces; then + if list_search $interface $tcpflags_interfaces; then rulenum=$(($rulenum + 1)) fi fi diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 46e874594..408a6a2e3 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -542,8 +542,8 @@ fi # # Create the version file # -echo "$VERSION" > ${PREFIX}/usr/lib/shorewall/version -chmod 644 ${PREFIX}/usr/lib/shorewall/version +echo "$VERSION" > ${PREFIX}/usr/share/shorewall/version +chmod 644 ${PREFIX}/usr/share/shorewall/version # # Remove and create the symbolic link to the firewall script #