On Tue, 2011-12-06 at 16:08 +1100, Kilburn Abrahams wrote: > Hi, > > The command shorewall iprange <address>-<address> requires nospaces, > could this be relaxed to also allow format iprange <address> - > <address>. Normally whois and other cli commands print results in > <address> - <address> format.
The attached patch will be included in 4.4.27. Regards, -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
diff --git a/Shorewall/shorewall b/Shorewall/shorewall
index 1edb79e..11964d2 100755
--- a/Shorewall/shorewall
+++ b/Shorewall/shorewall
@@ -2118,13 +2118,19 @@ case "$COMMAND" in
iprange)
[ -n "$g_debugging" ] && set -x
- case $2 in
+ range=''
+ while [ $# -gt 0 ]; do
+ shift
+ range="${range}${1}"
+ done
+
+ case $range in
*.*.*.*-*.*.*.*)
- for address in ${2%-*} ${2#*-}; do
+ for address in ${range%-*} ${range#*-}; do
valid_address $address || fatal_error "Invalid IP address: $address"
done
- ip_range $2
+ ip_range $range
;;
*)
usage 1
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
