Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove disabled devel/debug code

  • Loading branch information...
commit c17427ffb26a699962c0979d72029a9b1fc6d050 1 parent cbf3c62
Jeff Uphoff juphoff authored
Showing with 0 additions and 10 deletions.
  1. +0 −10 tools/euca_ipt
10 tools/euca_ipt
View
@@ -76,7 +76,6 @@ if (@ARGV == 3) {
dodie("euca_ipt: wrong number of commandline parameters\n");
}
-# FIXME: Does not yet save packet counters.
sub old_euca_ipt() {
$table = shift @_;
if ($table =~ /^([ &:#-\@\w.]+)$/) {
@@ -239,26 +238,21 @@ sub new_euca_ipt() {
while(<RFH>) {
chomp;
my $line = $_;
-# print STDERR "~~~> $_\n";
if ($line =~ /^\s*#/) {
} elsif ($line =~ /\[[0-9]+:[0-9]+\] -A/) {
my ($counters, $add, $chain, @rule) = split(/\s+/, $line);
if ($chain && @rule) {
$oldchains{$chain} .= ",,," . join(" ", $counters, @rule);
-# print STDERR "+++> $add\n";
-# print STDERR "~~~> CHAIN($chain): $oldchains{$chain}\n";
$allchains{$chain} = 1;
}
} elsif ($line =~ /-A/) {
my ($add, $chain, @rule) = split(/\s+/, $line);
if ($chain && @rule) {
$oldchains{$chain} .= ",,," . join(" ", @rule);
-# print STDERR "~~~> $oldchains{$chain}\n";
$allchains{$chain} = 1;
}
} elsif ($line =~ /^:/) {
my ($exchain) = split(/\s+/, $line);
-# print STDERR "^^^> $exchain\n";
if ($exchain && $exchain ne "") {
$exchain =~ s/://g;
$allchains{$exchain} = 1;
@@ -313,17 +307,14 @@ sub new_euca_ipt() {
#restore non-eucalyptus chains
foreach $chain (keys(%oldchains)) {
-# print STDERR "---> $chain\n";
if (!$chainmap{$chain}) {
my @rules = split(',,,', $oldchains{$chain});
foreach $rule (@rules) {
if ($chain && $rule && $rule ne "") {
if ($rule =~ /^(\[[0-9]+:[0-9]+\]) (.+)/) {
print OFH "$1 -A $chain $2\n";
-# print STDERR ">>>> $1 -A $chain $2\n";
} else {
print OFH "-A $chain $rule\n";
-# print STDERR "===> -A $chain $rule\n";
}
}
}
@@ -332,7 +323,6 @@ sub new_euca_ipt() {
#install eucalyptus chains
foreach $chain (keys(%oldchains)) {
-# print STDERR "--.> $chain\n";
if ($chainmap{$chain}) {
my @rules = split(',,,', $oldchains{$chain});
my $rulelen = @rules;
Please sign in to comment.
Something went wrong with that request. Please try again.