/[smeserver]/rpms/e-smith-base+ldap/sme8/e-smith-base+ldap-5.2.0-chechIPOverlap.patch
ViewVC logotype

Contents of /rpms/e-smith-base+ldap/sme8/e-smith-base+ldap-5.2.0-chechIPOverlap.patch

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


Revision 1.1 - (show annotations) (download)
Sat Oct 24 20:35:32 2009 UTC (15 years ago) by snetram
Branch: MAIN
CVS Tags: e-smith-base+ldap-5_2_0-11_el5_sme, e-smith-base+ldap-5_2_0-13_el5_sme, e-smith-base+ldap-5_2_0-10_el5_sme, e-smith-base+ldap-5_2_0-15_el5_sme, e-smith-base+ldap-5_2_0-12_el5_sme, e-smith-base+ldap-5_2_0-16_el5_sme, e-smith-base+ldap-5_2_0-18_el5_sme, e-smith-base+ldap-5_2_0-9_el5_sme, e-smith-base+ldap-5_2_0-8_el5_sme, e-smith-base+ldap-5_2_0-17_el5_sme, e-smith-base+ldap-5_2_0-14_el5_sme, HEAD
Error occurred while calculating annotation data.
* Sat Oct 24 2009 Jonathan Martens <smeserver-contribs@snetram.nl>
- Prevent IP conflicts between local and external interface in server gateway mode [SME: 5501]

1 diff -up e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm.checkIPOverlap e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm
2 --- e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm.checkIPOverlap 2008-08-20 23:17:24.000000000 +0200
3 +++ e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm 2009-10-24 20:32:00.000000000 +0200
4 @@ -1049,7 +1049,38 @@
5 {
6 if ( isValidIP($choice) )
7 {
8 - $db->set_value('ExternalNetmask', cleanIP($choice));
9 + # Check for overlapping ranges in external and internal interface IP and netmasks
10 +
11 + # Retrieve the local IP/mask setting
12 + my $localAddress = $db->get_value('LocalIP');
13 + my $localNetmask = $db->get_value('LocalNetmask');
14 +
15 + # Retrieve the external IP/mask setting
16 + my $externalAddress = $db->get_value('ExternalIP');
17 + my $externalNetmask = cleanIP($choice);
18 +
19 + if ( ipv4_in_network($localAddress, $localNetmask, $externalAddress, $externalNetmask) )
20 + {
21 +
22 + ($rc, $choice) = $console->message_page
23 + (
24 + title => gettext("Invalid address ranges"),
25 + text => gettext(
26 + "Internal address range overlaps external address range" .
27 + "\n\n".
28 + "Local interface: $localAddress/$localNetmask" .
29 + "\n" .
30 + "External interface: $externalAddress/$externalNetmask" .
31 + "\n\n".
32 + "Please review your settings."
33 + )
34 + );
35 +
36 + goto STATIC_IP;
37 +
38 + }
39 +
40 + $db->set_value('ExternalNetmask', $externalNetmask);
41 goto STATIC_GATEWAY;
42 }
43 }

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