[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[3752]
From: owes () users ! sourceforge ! net
Date: 2009-10-27 16:50:42
Message-ID: E1N2pFq-0007LY-MF () d5vjzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 3752
http://ipcop.svn.sourceforge.net/ipcop/?rev=3752&view=rev
Author: owes
Date: 2009-10-27 16:50:42 +0000 (Tue, 27 Oct 2009)
Log Message:
-----------
Avoid assigning duplicate statc IPs
Modified Paths:
--------------
ipcop/trunk/html/cgi-bin/openvpn.cgi
Modified: ipcop/trunk/html/cgi-bin/openvpn.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/openvpn.cgi 2009-10-27 16:29:06 UTC (rev 3751)
+++ ipcop/trunk/html/cgi-bin/openvpn.cgi 2009-10-27 16:50:42 UTC (rev 3752)
@@ -286,15 +286,18 @@
my $thisip = shift;
my $ovpnnet = NetAddr::IP->new($vpnsettings{'DOVPN_SUBNET'});
my $index = 5;
-
+
while ($index < $ovpnnet->num()) {
my $ip = $ovpnnet->nth($index)->addr();
$roadwarriorips{$ip} = '';
$roadwarriorips{$ip} = "selected='selected'" if ($ip eq $thisip);
$index += 4;
}
-
+
# TODO: remove already assigned IPs from list
+ foreach my $key (keys %confighash) {
+ delete($roadwarriorips{"$confighash{$key}[32]"}) unless \
($confighash{$key}[32] eq $thisip); + }
}
###
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic