/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-checkIPOverlap.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-checkIPOverlap.patch

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


Revision 1.1 - (hide annotations) (download)
Sat Oct 24 20:35:32 2009 UTC (15 years ago) by snetram
Branch: MAIN
CVS Tags: e-smith-base-5_2_0-34_el5_sme, e-smith-base-5_2_0-32_el5_sme, e-smith-base-5_2_0-30_el5_sme, e-smith-base-5_2_0-11_el5_sme, e-smith-base-5_2_0-9_el5_sme, e-smith-base-5_2_0-67_el5_sme, e-smith-base-5_2_0-14_el5_sme, e-smith-base-5_2_0-71_el5_sme, e-smith-base-5_2_0-12_el5_sme, e-smith-base-5_2_0-52_el5_sme, e-smith-base-5_2_0-51_el5_sme, e-smith-base-5_2_0-10_el5_sme, e-smith-base-5_2_0-53_el5_sme, e-smith-base-5_2_0-68_el5_sme, e-smith-base-5_2_0-77_el5_sme, e-smith-base-5_2_0-21_el5_sme, e-smith-base-5_2_0-26_el5_sme, e-smith-base-5_2_0-59_el5_sme, e-smith-base-5_2_0-36_el5_sme, e-smith-base-5_2_0-56_el5_sme, e-smith-base-5_2_0-55_el5_sme, e-smith-base-5_2_0-78_el5_sme, e-smith-base-5_2_0-86_el5_sme, e-smith-base-5_2_0-76_el5_sme, e-smith-base-5_2_0-84_el5_sme, e-smith-base-5_2_0-38_el5_sme, e-smith-base-5_2_0-65_el5_sme, e-smith-base-5_2_0-88_el5_sme, e-smith-base-5_2_0-64_el5_sme, e-smith-base-5_2_0-47_el5_sme, e-smith-base-5_2_0-81_el5_sme, e-smith-base-5_2_0-82_el5_sme, e-smith-base-5_2_0-50_el5_sme, e-smith-base-5_2_0-57_el5_sme, e-smith-base-5_2_0-15_el5_sme, e-smith-base-5_2_0-89_el5_sme, e-smith-base-5_2_0-49_el5_sme, e-smith-base-5_2_0-90_el5_sme, e-smith-base-5_2_0-48_el5_sme, e-smith-base-5_2_0-33_el5_sme, e-smith-base-5_2_0-87_el5_sme, e-smith-base-5_2_0-80_el5_sme, e-smith-base-5_2_0-16_el5_sme, e-smith-base-5_2_0-28_el5_sme, e-smith-base-5_2_0-24_el5_sme, e-smith-base-5_2_0-8_el5_sme, e-smith-base-5_2_0-70_el5_sme, e-smith-base-5_2_0-66_el5_sme, e-smith-base-5_2_0-63_el5_sme, e-smith-base-5_2_0-17_el5_sme, e-smith-base-5_2_0-41_el5_sme, e-smith-base-5_2_0-42_el5_sme, e-smith-base-5_2_0-61_el5_sme, e-smith-base-5_2_0-19_el5_sme, e-smith-base-5_2_0-60_el5_sme, e-smith-base-5_2_0-58_el5_sme, e-smith-base-5_2_0-20_el5_sme, e-smith-base-5_2_0-31_el5_sme, e-smith-base-5_2_0-45_el5_sme, e-smith-base-5_2_0-46_el5_sme, e-smith-base-5_2_0-29_el5_sme, e-smith-base-5_2_0-85_el5_sme, e-smith-base-5_2_0-69_el5_sme, e-smith-base-5_2_0-79_el5_sme, e-smith-base-5_2_0-27_el5_sme, e-smith-base-5_2_0-72_el5_sme, e-smith-base-5_2_0-75_el5_sme, e-smith-base-5_2_0-22_el5_sme, e-smith-base-5_2_0-73_el5_sme, e-smith-base-5_2_0-54_el5_sme, e-smith-base-5_2_0-37_el5_sme, e-smith-base-5_2_0-43_el5_sme, e-smith-base-5_2_0-44_el5_sme, e-smith-base-5_2_0-62_el5_sme, e-smith-base-5_2_0-25_el5_sme, e-smith-base-5_2_0-74_el5_sme, e-smith-base-5_2_0-35_el5_sme, e-smith-base-5_2_0-83_el5_sme, e-smith-base-5_2_0-23_el5_sme, e-smith-base-5_2_0-18_el5_sme
* 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 snetram 1.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