From f562fa4836ddddaa57053276e108e29e5203e4b9 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 26 Jun 2003 14:29:24 +0000 Subject: [PATCH] Correct ip_range handling of CIDR git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@617 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 811a40d36..a340c7cd7 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -2851,8 +2851,8 @@ get_routed_subnets() # $1 = interface name decodeaddr() { local x local temp=0 - - ifs=$IFS + local ifs=$IFS + IFS=. for x in $1; do @@ -2882,6 +2882,18 @@ encodeaddr() { # Enumerate the members of an IP range # ip_range() { + local first + local last + + case $1 in + *-*) + ;; + *) + echo $1 + return + ;; + esac + first=`decodeaddr ${1%-*}` last=`decodeaddr ${1#*-}`