summaryrefslogtreecommitdiffstats
path: root/arptables-save
diff options
context:
space:
mode:
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);