1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-s2s-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/openvpns2s.pm mezzanine_patched_smeserver-openvpn-s2s-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/openvpns2s.pm |
2 |
|
|
--- smeserver-openvpn-s2s-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/openvpns2s.pm 2010-10-16 17:56:47.000000000 +0200 |
3 |
|
|
+++ mezzanine_patched_smeserver-openvpn-s2s-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/openvpns2s.pm 2010-10-16 23:35:27.000000000 +0200 |
4 |
|
|
@@ -376,6 +376,7 @@ |
5 |
|
|
sub is_valid_vpn_ip{ |
6 |
|
|
my ($fm,$ip) = @_; |
7 |
|
|
my $ret = 'OK'; |
8 |
|
|
+ my $conf = $fm->{cgi}->param('conf_name') || ''; |
9 |
|
|
|
10 |
|
|
# Check it's a valid IP number |
11 |
|
|
return $fm->localise('NOT_A_VALID_IP_NUMBER') unless |
12 |
|
|
@@ -384,6 +385,7 @@ |
13 |
|
|
# Check it's not already used by another daemon |
14 |
|
|
foreach my $vpn ($ovpn_db->get_all_by_prop(type=>'client'), |
15 |
|
|
$ovpn_db->get_all_by_prop(type=>'server')){ |
16 |
|
|
+ next if ($vpn->key eq $conf); |
17 |
|
|
$ret = $fm->localise('IP_ALREADY_IN_USED') |
18 |
|
|
if ((($vpn->prop('LocalIP') || '') eq $ip) || |
19 |
|
|
(($vpn->prop('RemoteIP') || '') eq $ip)); |