pf-tools commit: r575 [ccaillet-guest] - in /trunk: debian/changelog lib/PFTools/Net.pm

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Tue Feb 5 11:26:25 UTC 2008


Author: ccaillet-guest
Date: Tue Feb  5 11:26:24 2008
New Revision: 575

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=575
Log:
* adding a WARN: message when a tagged interface differs from defined tag
  for the vlan

Modified:
    trunk/debian/changelog
    trunk/lib/PFTools/Net.pm

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=575&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Tue Feb  5 11:26:24 2008
@@ -27,6 +27,8 @@
   * adding the choice of different vlan for an interface like eth2 in function
     of the host number
   * adding the possibility for routes to be function of the host number
+  * adding a WARN: message when a tagged interface differs from defined tag
+    for the vlan
 
   [ Thomas Parmelan ]
   * lib-net: if no comment is specified in a zone, network or server
@@ -38,7 +40,7 @@
   * Update my email address.
   * Merge the remaining changes from 0.32.47-1 and 0.32.48-1.
 
- -- Christophe Caillet <quadchris at free.fr>  Mon, 04 Feb 2008 11:28:46 +0100
+ -- Christophe Caillet <quadchris at free.fr>  Tue, 05 Feb 2008 12:13:02 +0100
 
 pf-tools (0.32.48-1) unstable; urgency=low
 

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=575&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Tue Feb  5 11:26:24 2008
@@ -1050,15 +1050,16 @@
 		if ( ref ( $S->{'interface'}->{$i} ) eq 'HASH' ) {
 			if ( defined $S->{'interface'}->{$i}->{$mnamindexnum} ) {
 				$lan = $S->{'interface'}->{$i}->{$mnamindexnum} ;
-				print "Adding vlan $lan for interface $i on number $mnamindexnum\n" ;
 			} elsif ( ! defined $S->{'interface'}->{$i}->{'default'} ) {
 				Abort( $ERR_SYNTAX, "No default vlan defined for interface ".$i ) ;
 			} else {
 				$lan = $S->{'interface'}->{$i}->{'default'} ;
-				print "Adding default vlan $lan for interface $i\n" ;
 			}
 		}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'} );
 		}
 		$nam = $mnam . "." . $lan;
 




More information about the pf-tools-commits mailing list