summaryrefslogtreecommitdiffstats
path: root/arptables-save
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2010-10-10 17:30:38 +0000
committerBart De Schuymer <bdschuym@pandora.be>2010-10-10 17:30:38 +0000
commit5e43700bfacf5be6c142df8cf89e28cedb6d36d4 (patch)
tree1b6e6e90d730710ae3b79b520c6526ace66114aa /arptables-save
parent52d276d7c62d5dd398143ab82e3d589f995d2ce7 (diff)
- 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
Diffstat (limited to 'arptables-save')
-rw-r--r--arptables-save7
1 files 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);