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

Annotation of /rpms/smeserver-openvpn-s2s/contribs7/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 - (hide annotations) (download)
Tue Nov 2 16:43:51 2010 UTC (14 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: smeserver-openvpn-s2s-0_1-15_el4_sme, smeserver-openvpn-s2s-0_1-13_el4_sme, smeserver-openvpn-s2s-0_1-19_el4_sme, smeserver-openvpn-s2s-0_1-14_el4_sme, smeserver-openvpn-s2s-0_1-12_el4_sme, smeserver-openvpn-s2s-0_1-18_el4_sme, smeserver-openvpn-s2s-0_1-16_el4_sme, smeserver-openvpn-s2s-0_1-20_el4_sme, smeserver-openvpn-s2s-0_1-21_el4_sme, smeserver-openvpn-s2s-0_1-11_el4_sme, HEAD
Initial import

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-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