From ed899188f8305196ca65b40b6b2684e22be5171f Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 6 Jul 2003 16:10:23 +0000 Subject: [PATCH] Allow address lists in /etc/shorewall/hosts entries git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@647 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 16e35d883..7a302e27c 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -865,10 +865,18 @@ find_interfaces_by_option() # $1 = option # find_hosts_by_option() # $1 = option { + local hosts interface address addresses options + while read ignore hosts options; do expandv options - list_search $1 `separate_list $options` && \ - echo `expand $hosts` + if list_search $1 `separate_list $options`; then + expandv hosts + interface=${hosts%:*} + addresses=${hosts#*:} + for address in `separate_list $addresses`; do + echo $interface:$address + done + fi done < $TMP_DIR/hosts for interface in $all_interfaces; do