* dns.cpp (list): (change in libfwbuilder) getHostByName() used to

insert duplicate IP addresses into the list of the results. Now
making sure ip addresses in the result are unique.
This commit is contained in:
Vadim Kurland
2008-10-21 03:21:32 +00:00
parent 483dab7051
commit d022671ddf
6 changed files with 37 additions and 61 deletions
+7 -15
View File
@@ -1,18 +1,10 @@
#!/usr/bin/perl
#!/bin/sh
$XMLFILE=@ARGV[0];
while (<>) {
$str=$_;
while ( $str=~ /<Firewall / ) {
$str=~ /<Firewall [^>]+name="([^"]*).*$"/;
$fw=$1;
printf "\n";
printf "echo '********* $fw'\n";
printf "fwb_ipfw -v -f $XMLFILE $fw\n";
$str=~ s/^.*<Firewall [^>]+name="$fw"[^>]+>//;
}
}
XMLFILE=$1
fwbedit list -f $XMLFILE -o /User/Firewalls -c -F%name% | sort | while read fwobj; do
echo "echo"
echo "echo \"============================ $fwobj\""
echo "fwb_ipfw -v -f $XMLFILE -xt $fwobj"
done