From 5e43700bfacf5be6c142df8cf89e28cedb6d36d4 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Sun, 10 Oct 2010 17:30:38 +0000 Subject: - use -n so that IP addresses are resolved (similar to iptables' behaviour) - don't use -v because the reason for using it was due to a bug which has now been fixed --- arptables-save | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arptables-save b/arptables-save index df9ad25..f434db3 100644 --- a/arptables-save +++ b/arptables-save @@ -19,7 +19,7 @@ sub process_table { my $line = ""; foreach $line (split("\n",$_[0])) { - if ($line =~ m/Chain\s(.*?)\s\(policy\s(.*?)\s/) { + if ($line =~ m/Chain\s(.*?)\s\(policy\s(.*?)\)/) { $chains = $chains . ":$1 $2\n"; $chain = $1; next; @@ -32,9 +32,6 @@ sub process_table { if ($line =~ m/^$/) { next; } - # Due to arptables "issues" with displaying device names - # we need to use -v and then do some processing - $line =~ s/\s,\s.*//; $rules = $rules . "-A $chain $line\n"; } @@ -47,7 +44,7 @@ sub process_table { # ======================================================== unless (-x "$tool") { print "ERROR: Tool $tool isn't executable"; exit -1; }; -$table =`$tool -t filter -L -v`; +$table =`$tool -t filter -L -n`; unless ($? == 0) { print $table; exit -1 }; &process_table($table); -- cgit v1.2.3