pf-tools commit: r569 [ccaillet-guest] - in /trunk: README.doc debian/changelog lib/PFTools/Net.pm
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Jan 22 13:50:02 UTC 2008
Author: ccaillet-guest
Date: Tue Jan 22 13:50:01 2008
New Revision: 569
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=569
Log:
* adding non-contiguous IP on interfaces vlan by the directive
ip.<vlan>.<hostnum> in private-network
Modified:
trunk/README.doc
trunk/debian/changelog
trunk/lib/PFTools/Net.pm
Modified: trunk/README.doc
URL: http://svn.debian.org/wsvn/pf-tools/trunk/README.doc?rev=569&op=diff
==============================================================================
--- trunk/README.doc (original)
+++ trunk/README.doc Tue Jan 22 13:50:01 2008
@@ -6,6 +6,22 @@
========================================================================
private-network :
+
+* ip.<vlan>.HOSTNUM
+
+ [optional]
+
+ If defined, the value of this directive overrides the ipstart mechanism
+ for the IP address of the interface's vlan
+
+ Sample use :
+
+ To change the IP on vlan-systeme from 18.1, for host01, to 18.10
+
+ [host%%]
+ ...
+ ipstart.vlan-system = 18.0
+ ip.vlan-systeme.1 = 18.10
* cmdline
Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=569&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Tue Jan 22 13:50:01 2008
@@ -18,6 +18,8 @@
* exporting $UML and $VMWARE and Get_dns_from_zone on Net.pm
* adding use strict on Net.pm and Conf.pm (WIP)
* fix for mk_interfaces, now it works :)
+ * adding non-contiguous IP on interfaces vlan by the directive
+ ip.<vlan>.<hostnum> in private-network
[ Thomas Parmelan ]
* lib-net: if no comment is specified in a zone, network or server
@@ -29,7 +31,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, 21 Jan 2008 14:48:58 +0100
+ -- Christophe Caillet <quadchris at free.fr> Tue, 22 Jan 2008 14:46:15 +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=569&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Tue Jan 22 13:50:01 2008
@@ -1052,7 +1052,10 @@
my $addr = $Z->{'NETWORK'}->{'BY_NAME'}->{$lan}->{'network'};
- if ( defined $S->{'ipstart'}->{$lan} ) {
+ if ( defined $S->{'ip'}->{$lan}->{$mnamindexnum} ) {
+ $start = $S->{'ip'}->{$lan}->{$mnamindexnum}
+ }
+ elsif ( defined $S->{'ipstart'}->{$lan} ) {
$start = $S->{'ipstart'}->{$lan};
}
elsif ( defined $S->{'ipstart'}->{'default'} ) {
@@ -1067,8 +1070,15 @@
}
$M->{'zone'}->{$nam} = {};
- $M->{'zone'}->{$nam}->{'FIELD'}
- = Address( $addr, $start, $ipindex );
+ if ( defined $S->{'ip'}->{$lan}->{$mnamindexnum} ) {
+ $M->{'zone'}->{$nam}->{'FIELD'}
+ = Address ( $addr, $start, 0 ) ;
+ }
+ else {
+ $M->{'zone'}->{$nam}->{'FIELD'}
+ = Address( $addr, $start, $ipindex );
+ }
+
$M->{'zone'}->{$nam}->{'TYPE'} = 'A';
# Adresse ethernet (pas forcement avec dhcp, eg tftp)
More information about the pf-tools-commits
mailing list