pf-tools commit: r579 [ccaillet-guest] - /trunk/lib/PFTools/Net.pm

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Tue Feb 5 15:21:36 UTC 2008


Author: ccaillet-guest
Date: Tue Feb  5 15:21:36 2008
New Revision: 579

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=579
Log:
Correct indent and more explicit warning message

Modified:
    trunk/lib/PFTools/Net.pm

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=579&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Tue Feb  5 15:21:36 2008
@@ -998,22 +998,28 @@
 		# Definition de l'entree DNS pour cette interface
 		my $lan ;
 		if ( ref ( $S->{'interface'}->{$i} ) eq 'HASH' ) {
-			if ( defined $S->{'interface'}->{$i}->{$mnamindexnum} ) {
-				$lan = $S->{'interface'}->{$i}->{$mnamindexnum} ;
-			} elsif ( ! defined $S->{'interface'}->{$i}->{'default'} ) {
-				Abort( $ERR_SYNTAX, "No default vlan defined for interface ".$i ) ;
-			} else {
-				$lan = $S->{'interface'}->{$i}->{'default'} ;
-			}
-		}else {
-			$lan = $S->{'interface'}->{$i} ;
-		}
+		    if ( defined $S->{'interface'}->{$i}->{$mnamindexnum} ) {
+			$lan = $S->{'interface'}->{$i}->{$mnamindexnum} ;
+		    }
+		    elsif ( ! defined $S->{'interface'}->{$i}->{'default'} ) {
+			Abort( $ERR_SYNTAX, "No default vlan defined for interface ".$i ) ;
+		    }
+		    else {
+			$lan = $S->{'interface'}->{$i}->{'default'} ;
+		    }
+		}
+		else {
+		    $lan = $S->{'interface'}->{$i} ;
+		}
+		
 		if ( $i =~ /^eth[\d]+\.([\d]+)$/ && $Z->{'NETWORK'}->{'BY_NAME'}->{$lan}->{'tag'} ) {
-			Warn ( $ERR_SYNTAX, "Tag ".$1." differs from defined tag for vlan ".$lan ) if ( $1 != $Z->{'NETWORK'}->{'BY_NAME'}->{$lan}->{'tag'} );
-		}
+		    Warn ( $ERR_SYNTAX, "Tag ".$1." differs from defined tag for vlan ".$lan." on ".$i." for host ".$mnam ) if ( $1 != $Z->{'NETWORK'}->{'BY_NAME'}->{$lan}->{'tag'} );
+		}
+		
 		$nam = $mnam . "." . $lan;
+		
 		if ( $M->{'ifup'}->{$nam} ) {
-			Abort ( $ERR_SYNTAX, "Cannot define $i on vlan ".$lan." ".$M->{'ifup'}->{$nam}." is already on this vlan for host ".$mnam ) ;
+		    Abort ( $ERR_SYNTAX, "Cannot define $i on vlan ".$lan." ".$M->{'ifup'}->{$nam}." is already on this vlan for host ".$mnam ) ;
 		}
 
 		my $addr = $Z->{'NETWORK'}->{'BY_NAME'}->{$lan}->{'network'};




More information about the pf-tools-commits mailing list