1 |
diff -Nur --no-dereference smeserver-openvpn-s2s-0.2.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/openvpns2s.pm smeserver-openvpn-s2s-0.2/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/openvpns2s.pm |
2 |
--- smeserver-openvpn-s2s-0.2.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/openvpns2s.pm 2022-11-18 01:11:35.517000000 -0500 |
3 |
+++ smeserver-openvpn-s2s-0.2/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/openvpns2s.pm 2022-11-18 01:23:08.993000000 -0500 |
4 |
@@ -361,6 +361,12 @@ |
5 |
my $key = $config->key; |
6 |
|
7 |
my $status = $config->prop('status') || 'enabled'; |
8 |
+ my $linkup = "<span style='color:red'>". $fm->localise('DOWN')."</span>" ; |
9 |
+ use Net::Ping; |
10 |
+ my $p = Net::Ping->new('icmp'); |
11 |
+ $linkup = "<span style='color:green'>". $fm->localise('UP') . "</span>" if (($status eq "enabled" ) && ( $p->ping($config->prop('RemoteIP'),1) ) ); |
12 |
+ $linkup = " " if ($status eq "disabled" ); |
13 |
+ |
14 |
if ($status eq 'enabled'){ |
15 |
$status = $fm->localise('ENABLED'); |
16 |
} |
17 |
@@ -372,10 +378,6 @@ |
18 |
my $hmac = $config->prop('HMAC') || 'SHA1'; |
19 |
$hmac= "<span style='color:red'>". $fm->localise('INSECURE'). " $hmac</span> " unless ($hmac eq "whirlpool" || $hmac =~ /(512|256|384|224)$/); |
20 |
my $authe = $config->prop('Authentication') || ''; |
21 |
- my $linkup = "<span style='color:red'>". $fm->localise('DOWN')."</span>" ; |
22 |
- use Net::Ping; |
23 |
- my $p = Net::Ping->new(); |
24 |
- $linkup = "<span style='color:green'>". $fm->localise('UP') ."</span>" if $p->ping($config->prop('RemoteIP')); |
25 |
|
26 |
print $q->Tr (esmith::cgi::genSmallCell($q,"$key"), |
27 |
esmith::cgi::genSmallCell($q,"$status"), |