pf-tools commit: r598 [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 Jun 3 14:24:37 UTC 2008
Author: ccaillet-guest
Date: Tue Jun 3 14:24:36 2008
New Revision: 598
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=598
Log:
Fix a bug on Mk_zone and Add_server to avoid a potential information loss
on certain configuration cases
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=598&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Tue Jun 3 14:24:36 2008
@@ -9,10 +9,12 @@
* adding race condition in Add_server on PFTools::Net for checking arch
parameter defined on private-network
* updating README.doc with new options
-
- -- Christophe Caillet <quadchris at free.fr> Mon, 02 Jun 2008 17:17:50 +0200
-
-pf -tools (0.33-0WIP1) unstable; urgency=low
+ * Fix a bug on Mk_zone and Add_server to avoid a potential information loss
+ on certain configuration cases
+
+ -- Christophe Caillet <quadchris at free.fr> Tue, 03 Jun 2008 16:19:02 +0200
+
+pf-tools (0.33-0WIP1) unstable; urgency=low
[ Christophe Caillet ]
* Modifying lib-* to proper perl modules devel style
Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=598&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Tue Jun 3 14:24:36 2008
@@ -1231,17 +1231,9 @@
$start = $S->{'ipstart'}->{'default'};
}
- $Z->{'SERVERS'}->{'BY_ADDR'}->{
- Address(
- $Z->{'NETWORK'}->{'BY_NAME'}->{ $S->{'shortname'} }->{'network'},
- $start, 0
- )
- }
- = $N;
- }
-# else {
-# Warn( $ERR_SYNTAX, "$srv: no shortname defined, so no SERVERS->BY_ADDR definition. Check this is really what you want!" );
-# }
+ my $srv_addr = Address ( $Z->{'NETWORK'}->{'BY_NAME'}->{ $S->{'shortname'} }->{'network'}, $start, 0 );
+ push ( @{$Z->{'SERVERS'}->{'BY_ADDR'}->{$srv_addr}}, $N ) ;
+ }
$Z->{'SERVERS'}->{'BY_NAME'}->{$srv} = $N;
@@ -1594,28 +1586,23 @@
";;============================================================================\n\n";
foreach $s ( sort ( keys %{ $Z->{'SERVERS'}->{'BY_ADDR'} } ) ) {
- my $N = $Z->{'SERVERS'}->{'BY_ADDR'}->{$s};
- print "; ", $N->{'comment'}, "\n";
- print "; number: ", $N->{'number'}, "\n";
- print "; nodes: ", $N->{'nodes'}, "\n"
- if ( defined( $N->{'nodes'} ) && $N->{'nodes'} > 1 );
- print
- ";----------------------------------------------------------------------------\n";
-
- foreach $m ( sort ( keys %{ $N->{'SRVLIST'} } ) ) {
- my $M = $N->{'SRVLIST'}->{$m};
- my $nam;
-
- foreach $nam ( sort ( keys %{ $M->{'zone'} } ) ) {
- printf(
- "%-29s IN %s\t%s\n",
- $nam,
- $M->{'zone'}->{$nam}->{'TYPE'},
- $M->{'zone'}->{$nam}->{'FIELD'}
- );
- }
- print "\n";
- }
+ foreach my $host ( @{$Z->{'SERVERS'}->{'BY_ADDR'}->{$s}} ) {
+ print "; ", $host->{'comment'}, "\n";
+ print "; number: ", $host->{'number'}, "\n";
+ print "; nodes: ", $host->{'nodes'}, "\n" if ( defined( $host->{'nodes'} ) && $host->{'nodes'} > 1 );
+ print ";----------------------------------------------------------------------------\n";
+
+ foreach $m ( sort ( keys %{ $host->{'SRVLIST'} } ) ) {
+ my $M = $host->{'SRVLIST'}->{$m};
+ my $nam;
+
+ foreach $nam ( sort ( keys %{ $M->{'zone'} } ) ) {
+ printf ( "%-29s IN %s\t%s\n", $nam, $M->{'zone'}->{$nam}->{'TYPE'}, $M->{'zone'}->{$nam}->{'FIELD'} );
+ }
+ print "\n";
+ }
+ }
+
}
### Alias
More information about the pf-tools-commits
mailing list