/[smecontribs]/rpms/smeserver-openvpn-s2s/contribs8/smeserver-openvpn-s2s-0.1-check_for_local_nets.patch
ViewVC logotype

Contents of /rpms/smeserver-openvpn-s2s/contribs8/smeserver-openvpn-s2s-0.1-check_for_local_nets.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Mar 3 21:10:29 2013 UTC (11 years, 8 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-openvpn-s2s-0_1-21_el5_sme, smeserver-openvpn-s2s-0_1-22_el5_sme, smeserver-openvpn-s2s-0_1-25_el5_sme, smeserver-openvpn-s2s-0_1-26_el5_sme, smeserver-openvpn-s2s-0_1-24_el5_sme, smeserver-openvpn-s2s-0_1-23_el5_sme, smeserver-openvpn-s2s-0_1-27_el5_sme, HEAD
Initial import

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-17 00:07:07.000000000 +0200
3 +++ mezzanine_patched_smeserver-openvpn-s2s-0.1/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/openvpns2s.pm 2010-10-17 00:06:48.000000000 +0200
4 @@ -333,13 +333,17 @@
5 sub is_valid_net_or_empty{
6 my ($fm, $nets) = @_;
7 my $ret = 'OK';
8 + my $conf = $fm->{cgi}->param('conf_name') || '';
9
10 foreach my $net (split (/[;,]/, $nets)){
11 $ret = $fm->localise('INVALID_NET') unless $net =~ m/([\d\.]+)\/([\d\.]+)/;
12 my $netaddr = $1;
13 my $mask = $2;
14 - $ret = $fm->localise('INVALID_NET') unless
15 - (CGI::FormMagick::Validator::ip_number($fm,$netaddr) eq 'OK' &&
16 + $ret = $fm->localise('NET_IS_LOCAL') if
17 + ($net_db->get("$netaddr") &&
18 + ($net_db->get("$netaddr")->prop('VPN') || '') ne $conf);
19 + $ret = $fm->localise('INVALID_NET') unless
20 + (CGI::FormMagick::Validator::ip_number($fm,$netaddr) eq 'OK' &&
21 CGI::FormMagick::Validator::ip_number($fm,$mask) eq 'OK');
22 }
23 return $ret;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed