1 |
jpp |
1.1 |
diff -Nur smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip |
2 |
|
|
--- smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip 2019-02-18 21:13:42.739000000 -0500 |
3 |
|
|
+++ smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip 2019-02-18 21:31:14.383000000 -0500 |
4 |
|
|
@@ -6,9 +6,10 @@ |
5 |
|
|
chomp($KERNEL); |
6 |
|
|
my $PATH_MODULE = "/lib/modules/$KERNEL/extra/xt_geoip.ko"; |
7 |
|
|
my $PATH2_MODULE = "/lib/modules/$KERNEL/weak-updates/xt_geoip.ko"; |
8 |
|
|
+ my $PATH3_MODULE = "/lib/modules/$KERNEL/weak-updates/xtables-addons/xt_geoip.ko"; |
9 |
|
|
if ($GP eq 'enabled' and $BC ne '') |
10 |
|
|
{ |
11 |
|
|
- if (-s $PATH_MODULE || -s $PATH2_MODULE) |
12 |
|
|
+ if (-s $PATH_MODULE || -s $PATH2_MODULE || -s $PATH3_MODULE) |
13 |
|
|
{ |
14 |
|
|
$OUT .= " ## xtables-addons GEOIP ##\n"; |
15 |
|
|
$OUT .= " /sbin/iptables -A INPUT -m geoip --src-cc $BC -j ULOG --ulog-prefix \"GeoIP BAN: ALL\"\n"; |
16 |
|
|
diff -Nur smeserver-xt_geoip-1.0.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm smeserver-xt_geoip-1.0.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm |
17 |
|
|
--- smeserver-xt_geoip-1.0.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2019-02-18 21:13:42.743000000 -0500 |
18 |
|
|
+++ smeserver-xt_geoip-1.0.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2019-02-18 21:30:16.327000000 -0500 |
19 |
|
|
@@ -139,7 +139,7 @@ |
20 |
|
|
|
21 |
|
|
sub get_geoip |
22 |
|
|
{ |
23 |
|
|
- return $db->get_prop("masq", "GeoIP"); |
24 |
|
|
+ return $db->get_prop("masq", "GeoIP") || 'disabled'; |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
=head2 get_stat_geoip |
28 |
|
|
@@ -150,7 +150,7 @@ |
29 |
|
|
sub get_stat_geoip |
30 |
|
|
{ |
31 |
|
|
my $fm = shift; |
32 |
|
|
- if ( get_geoip() == 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) { |
33 |
|
|
+ if ( get_geoip() eq 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) { |
34 |
|
|
return $fm->localise('ERROR_STATUS_GEOIP'); |
35 |
|
|
} else { |
36 |
|
|
return ''; |
37 |
|
|
@@ -163,7 +163,8 @@ |
38 |
|
|
sub get_date_update |
39 |
|
|
{ |
40 |
|
|
my $file = "/usr/share/xt_geoip/LE/A1.iv4"; |
41 |
|
|
- return strftime("%Y/%m/%d %H:%M", localtime( (stat($file))[9] )) || ''; |
42 |
|
|
+ my $filetime = ( -e $file ) ? (stat($file))[9] : 0; |
43 |
|
|
+ return strftime("%Y/%m/%d %H:%M", localtime( $filetime )) || ''; |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
=head2 change_settings |