Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

remove disabled devel/debug code

  • Loading branch information...
commit c17427ffb26a699962c0979d72029a9b1fc6d050 1 parent cbf3c62
Jeff Uphoff juphoff authored

Showing 1 changed file with 0 additions and 10 deletions. Show diff stats Hide diff stats

  1. +0 10 tools/euca_ipt
10 tools/euca_ipt
@@ -76,7 +76,6 @@ if (@ARGV == 3) {
76 76 dodie("euca_ipt: wrong number of commandline parameters\n");
77 77 }
78 78
79   -# FIXME: Does not yet save packet counters.
80 79 sub old_euca_ipt() {
81 80 $table = shift @_;
82 81 if ($table =~ /^([ &:#-\@\w.]+)$/) {
@@ -239,26 +238,21 @@ sub new_euca_ipt() {
239 238 while(<RFH>) {
240 239 chomp;
241 240 my $line = $_;
242   -# print STDERR "~~~> $_\n";
243 241 if ($line =~ /^\s*#/) {
244 242 } elsif ($line =~ /\[[0-9]+:[0-9]+\] -A/) {
245 243 my ($counters, $add, $chain, @rule) = split(/\s+/, $line);
246 244 if ($chain && @rule) {
247 245 $oldchains{$chain} .= ",,," . join(" ", $counters, @rule);
248   -# print STDERR "+++> $add\n";
249   -# print STDERR "~~~> CHAIN($chain): $oldchains{$chain}\n";
250 246 $allchains{$chain} = 1;
251 247 }
252 248 } elsif ($line =~ /-A/) {
253 249 my ($add, $chain, @rule) = split(/\s+/, $line);
254 250 if ($chain && @rule) {
255 251 $oldchains{$chain} .= ",,," . join(" ", @rule);
256   -# print STDERR "~~~> $oldchains{$chain}\n";
257 252 $allchains{$chain} = 1;
258 253 }
259 254 } elsif ($line =~ /^:/) {
260 255 my ($exchain) = split(/\s+/, $line);
261   -# print STDERR "^^^> $exchain\n";
262 256 if ($exchain && $exchain ne "") {
263 257 $exchain =~ s/://g;
264 258 $allchains{$exchain} = 1;
@@ -313,17 +307,14 @@ sub new_euca_ipt() {
313 307
314 308 #restore non-eucalyptus chains
315 309 foreach $chain (keys(%oldchains)) {
316   -# print STDERR "---> $chain\n";
317 310 if (!$chainmap{$chain}) {
318 311 my @rules = split(',,,', $oldchains{$chain});
319 312 foreach $rule (@rules) {
320 313 if ($chain && $rule && $rule ne "") {
321 314 if ($rule =~ /^(\[[0-9]+:[0-9]+\]) (.+)/) {
322 315 print OFH "$1 -A $chain $2\n";
323   -# print STDERR ">>>> $1 -A $chain $2\n";
324 316 } else {
325 317 print OFH "-A $chain $rule\n";
326   -# print STDERR "===> -A $chain $rule\n";
327 318 }
328 319 }
329 320 }
@@ -332,7 +323,6 @@ sub new_euca_ipt() {
332 323
333 324 #install eucalyptus chains
334 325 foreach $chain (keys(%oldchains)) {
335   -# print STDERR "--.> $chain\n";
336 326 if ($chainmap{$chain}) {
337 327 my @rules = split(',,,', $oldchains{$chain});
338 328 my $rulelen = @rules;

0 comments on commit c17427f

Please sign in to comment.
Something went wrong with that request. Please try again.