WIO: Fix a problem with the Network-Table-Button

Message ID 1519748407-1622-1-git-send-email-sfeddersen@ipfire.org
State Accepted
Commit c1fc92a9b8e2a049875c02a736087beacb8c6348
Headers
Series WIO: Fix a problem with the Network-Table-Button |

Commit Message

Peter Müller via Development Feb. 28, 2018, 3:20 a.m. UTC
  ---
 src/wio/wio.cgi | 69 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 34 insertions(+), 35 deletions(-)
  

Comments

Michael Tremer Feb. 28, 2018, 11 p.m. UTC | #1
Hello,

none of the both patches bumps the release version.

Should this be a new release already or are you just collecting patches?

Best,
-Michael

On Tue, 2018-02-27 at 17:20 +0100, Stephan Feddersen via Development wrote:
> ---
>  src/wio/wio.cgi | 69 ++++++++++++++++++++++++++++--------------------------
> ---
>  1 file changed, 34 insertions(+), 35 deletions(-)
> 
> diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi
> index 8c43b04..c51910f 100644
> --- a/src/wio/wio.cgi
> +++ b/src/wio/wio.cgi
> @@ -21,7 +21,7 @@
>  #                                                                            
>  #
>  #############################################################################
> ##
>  #
> -# Version: 2018/01/05 14:34:23
> +# Version: 2018/02/27 16:54:23
>  #
>  # This wio.cgi is based on the Code from the IPCop WIO Addon
>  # and is extremly adapted to work with IPFire.
> @@ -106,10 +106,10 @@ my $count = 0;
>  my $showcount = 0;
>  
>  my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}";
> -my $clientimportbuttontext  = "$Lang::tr{'wio_show_table_on'}";
> -my $networksearchbuttontext  = "$Lang::tr{'wio_show_table_on'}";
> +my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}";
> +my $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
>  
> -my ( $infomessage, $errormessage, $importmessage, $message ) = '';
> +my ( $message, $infomessage, $errormessage, $importmessage ) = '';
>  
>  my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns,
> $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write, $webinterface,
>  	 $sendemailoff, $pingmethode, $online, $color, $bgcolor, $exitcode,
> $id, $line, $interface, $counter, $vpnn2nip, $vpnn2nmask, $ddns, $edc,
> @@ -280,7 +280,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'}
> ) {
>  
>  ## show / hide arptable
>  
> -if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') {
> +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) {
>  	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) {
>  		$wiosettings{'WIOGUISHOWARPTABLE'} = 'off';
>  		$arpbuttontext = "$Lang::tr{'wio_show_table_on'}";
> @@ -309,11 +309,11 @@ if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq
> 'clientimport' ) {
>  if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'networksearch' ) {
>  	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) {
>  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off';
> -		$clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}";
> +		$networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
>  	}
>  	else {
>  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on';
> -		$clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}";
> +		$networksearchbuttontext = "$Lang::tr{'wio_show_table_off'}";
>  	}
>  }
>  
> @@ -348,7 +348,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} ) {
>  	}
>  }
>  
> -## enable / disabel client || enable / disable dyndns || enable / disable
> sendemailon || enable / disable sendemailoff || change ip / fqdn
> +## enable / disable client || enable / disable dyndns || enable / disable
> sendemailon || enable / disable sendemailoff || change ip / fqdn
>  
>  if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'} ) { $edc =
> 'on'; }
>  if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable dyndns'} ) { $edd =
> 'on'; }
> @@ -983,7 +983,7 @@ for ($i=1; $i<=15; $i++) {
>  	print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n";
>  }
>  
> -print"	
> +print"
>  	</select>&nbsp;$Lang::tr{'wio sec'}</td>
>  </tr>
>  <tr><td colspan='3'>&nbsp;</td></tr>
> @@ -1123,7 +1123,7 @@ print"
>  	<td width='15%' align='center'><b>$Lang::tr{'wio_wanname'}</b></td>
>  	<td width='24%'
> align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td>
>  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> -	<td width='14%' align='center'><b>$Lang::tr{'wio_wancheck'}</b></td>
> +	<td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td>
>  </tr>
>  <tr bgcolor='$color{'color22'}' height='20'>
>  	<td align='center'>01</td>
> @@ -1196,7 +1196,7 @@ print"
>  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
>  	<td width='25%'
> align='center'><b>$Lang::tr{'wio_common_name'}</b></td>
>  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> -	<td width='14%'
> align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> +	<td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td>
>  </tr>
>  ";
>  
> @@ -1244,7 +1244,7 @@ $statustxt = "$Lang::tr{'capsclosed'}";
>  		  <td align='center' height='20'>&nbsp;</td>
>  		  </tr>
>  ";
> - 
> +
>  if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') {
>  	print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":"
> bgcolor='$color{'color22'}'")." height='20'><td>&nbsp;</td><td colspan='16'
> align='left'>$vpnconfighash{$key}[25]</td></tr>";
>  }
> @@ -1278,7 +1278,7 @@ print"
>  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
>  	<td width='25%' align='center'><b>$Lang::tr{'common name'}</b></td>
>  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> -	<td width='14%'
> align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> +	<td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td>
>  </tr>
>  ";
>  
> @@ -1310,7 +1310,6 @@ print"
>  			$statustxt = "$Lang::tr{'capsclosed'}";
>  		}
>  		else {
> -			
>  			if ($ovpnconfighash{$key}[3] eq 'net') {
>  				if (-e
> "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
>  					my @output = "";
> @@ -1378,7 +1377,7 @@ print"
>  		if ($ovpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'}
> eq 'on') {
>  			print"<tr".($idovpn % 2?"
> bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")."
> height='20'><td>&nbsp;</td><td colspan='16'
> align='left'>$ovpnconfighash{$key}[25]</td></tr>";
>  		}
> -		
> +
>  		print"<tr height='1'><td colspan='17'
> bgcolor='#696565'></td></tr>";
>  		$idovpn++
>  	}
> @@ -1519,7 +1518,7 @@ my $dotip = length($ipaddresses[$a]) -
> rindex($ipaddresses[$a],'.');
>  		if ( -e "$vpnpid" ) {
>  			foreach $key (keys(%vpnconfighash)) {
>  				next unless ($vpnconfighash{$key}[3] eq
> 'net');
> -				
> +
>  				my $convertip =
> &General::ipcidr2msk($vpnconfighash{$key}[11]);
>  
>  				my @net = split ("/", $convertip);
> @@ -1538,16 +1537,15 @@ my $dotip = length($ipaddresses[$a]) -
> rindex($ipaddresses[$a],'.');
>  			@match = split ("/", $ovpnsettings{'DOVPN_SUBNET'});
>  
>  			if ( &General::IpInSubnet($ipaddresses[$a],
> $match[0], $match[1]) ) {
> -				print"<td align='center'><img
> src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>"; 
> -				last SWITCH; 
> +				print"<td align='center'><img
> src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> +				last SWITCH;
>  			}
>  		}
>  
>  		if ( %ovpnccdconfhash ne '' ) {
>  			foreach $key (keys(%ovpnccdconfhash)) {
> -								
> +
>  				my $convertip =
> &General::ipcidr2msk($ovpnccdconfhash{$key}[1]);
> -							
>  				my @net = split ("/", $convertip);
>  
>  				$vpnn2nip = $net[0];
> @@ -1557,7 +1555,6 @@ my $dotip = length($ipaddresses[$a]) -
> rindex($ipaddresses[$a],'.');
>  					print"<td align='center'><img
> align='middle' src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN'
> /></td>";
>  					last SWITCH;
>  				}
> -					
>  			}
>  		}
>  
> @@ -1567,7 +1564,7 @@ my $dotip = length($ipaddresses[$a]) -
> rindex($ipaddresses[$a],'.');
>  			chomp ($rednet[1]);
>  			my $red_netmask = General::iporsubtodec($rednet[1]);
>  			my $red_netaddress =
> Network::get_netaddress("$rednet[0]/$red_netmask");
> -						
> +
>  			if ( &General::IpInSubnet($ipaddresses[$a],
> $red_netaddress, $red_netmask) ) {
>  				print"<td align='center' height='20'><img
> src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}'
> title='$Lang::tr{'wio_red_lan'}' /></td>";
>  				last SWITCH;
> @@ -2165,23 +2162,24 @@ close(FILE);
>  
>  #############################################################################
> ###############################################
>  
> -sub SortByTunnelName
> -{
> -    if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> -        return -1;
> -    }
> -    elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> -        return 1;
> -    }
> -    else {
> -        return 0;
> -    }
> +sub SortByTunnelName {
> +
> +	if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> +		return -1;
> +	}
> +	elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> +		return 1;
> +	}
> +	else {
> +		return 0;
> +	}
> +
>  }
>  
>  #############################################################################
> ###############################################
>  
> -sub validSave
> -{
> +sub validSave {
> +
>  	if ( $wiosettings{'IPADR'} eq '' && $wiosettings{'PINGMETHODE'} eq
> 'ip' && $wiosettings{'DYNDNS'} eq '' ) {
>  		$errormessage = $Lang::tr{'wio_ip_empty'};
>  	}
> @@ -2207,4 +2205,5 @@ sub validSave
>  	if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) {
> $errormessage = &WIO::checkinto($wiosettings{'IPADR'}, $wiosettings{'HOST'},
> @current); }
>  
>  	if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'} =~
> s/,/&#44;/g; }
> +
>  }
  
Michael Tremer Feb. 28, 2018, 11:38 p.m. UTC | #2
Hi,

I think you might have just forgotten to add the lfs/wio file to the commit in
case you changed the version number already.

Is that possible?

Best,
-Michael

On Wed, 2018-02-28 at 13:37 +0100, Stephan Feddersen wrote:
> Hello,
> 
> oh no, these patches should be included in the release version wio-1.3.2!
> 
> Where did I make my mistake in setting to GIT?
> 
> Best
> 
> Stephan
> 
> > -----Original Message-----
> > From: Michael Tremer [mailto:michael.tremer@ipfire.org]
> > Sent: Wednesday, February 28, 2018 1:01 PM
> > To: Stephan Feddersen <sfeddersen@ipfire.org>;
> > development@lists.ipfire.org
> > Subject: Re: [PATCH] WIO: Fix a problem with the Network-Table-Button
> > 
> > Hello,
> > 
> > none of the both patches bumps the release version.
> > 
> > Should this be a new release already or are you just collecting patches?
> > 
> > Best,
> > -Michael
> > 
> > On Tue, 2018-02-27 at 17:20 +0100, Stephan Feddersen via Development
> > wrote:
> > > ---
> > >  src/wio/wio.cgi | 69
> > > ++++++++++++++++++++++++++++--------------------------
> > > ---
> > >  1 file changed, 34 insertions(+), 35 deletions(-)
> > > 
> > > diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index 8c43b04..c51910f
> > > 100644
> > > --- a/src/wio/wio.cgi
> > > +++ b/src/wio/wio.cgi
> > > @@ -21,7 +21,7 @@
> > >  #
> > >  #
> > > 
> > > 
> > 
> > ##########################################################
> > ############
> > > #######
> > > ##
> > >  #
> > > -# Version: 2018/01/05 14:34:23
> > > +# Version: 2018/02/27 16:54:23
> > >  #
> > >  # This wio.cgi is based on the Code from the IPCop WIO Addon  # and
> > > is extremly adapted to work with IPFire.
> > > @@ -106,10 +106,10 @@ my $count = 0;
> > >  my $showcount = 0;
> > > 
> > >  my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; -my
> > > $clientimportbuttontext  = "$Lang::tr{'wio_show_table_on'}"; -my
> > > $networksearchbuttontext  = "$Lang::tr{'wio_show_table_on'}";
> > > +my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; my
> > > +$networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
> > > 
> > > -my ( $infomessage, $errormessage, $importmessage, $message ) = '';
> > > +my ( $message, $infomessage, $errormessage, $importmessage ) = '';
> > > 
> > >  my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns,
> > > $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write,
> > 
> > $webinterface,
> > >  	 $sendemailoff, $pingmethode, $online, $color, $bgcolor,
> > > $exitcode,
> > > $id, $line, $interface, $counter, $vpnn2nip, $vpnn2nmask, $ddns, $edc,
> > > @@ -280,7 +280,7 @@ if ( $wiosettings{'ACTION'} eq
> > > $Lang::tr{'wio_client_add'}
> > > ) {
> > > 
> > >  ## show / hide arptable
> > > 
> > > -if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') {
> > > +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) {
> > >  	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} )
> > > {
> > >  		$wiosettings{'WIOGUISHOWARPTABLE'} = 'off';
> > >  		$arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; @@ -
> > 
> > 309,11
> > > +309,11 @@ if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq
> > > 'clientimport' ) {  if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'}
> > > eq 'networksearch' ) {
> > >  	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} )
> > > {
> > >  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off';
> > > -		$clientimportbuttontext =
> > > "$Lang::tr{'wio_show_table_on'}";
> > > +		$networksearchbuttontext =
> > 
> > "$Lang::tr{'wio_show_table_on'}";
> > >  	}
> > >  	else {
> > >  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on';
> > > -		$clientimportbuttontext =
> > > "$Lang::tr{'wio_show_table_off'}";
> > > +		$networksearchbuttontext =
> > 
> > "$Lang::tr{'wio_show_table_off'}";
> > >  	}
> > >  }
> > > 
> > > @@ -348,7 +348,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} )
> > 
> > {
> > >  	}
> > >  }
> > > 
> > > -## enable / disabel client || enable / disable dyndns || enable /
> > > disable sendemailon || enable / disable sendemailoff || change ip /
> > > fqdn
> > > +## enable / disable client || enable / disable dyndns || enable /
> > > +disable
> > > sendemailon || enable / disable sendemailoff || change ip / fqdn
> > > 
> > >  if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'} ) {
> > > $edc = 'on'; }  if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable
> > > disable dyndns'} ) { $edd = 'on'; } @@ -983,7 +983,7 @@ for ($i=1;
> > > $i<=15; $i++) {
> > >  	print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n";
> > >  }
> > > 
> > > -print"
> > > +print"
> > >  	</select>&nbsp;$Lang::tr{'wio sec'}</td>  </tr>  <tr><td
> > > colspan='3'>&nbsp;</td></tr> @@ -1123,7 +1123,7 @@ print"
> > >  	<td width='15%'
> > 
> > align='center'><b>$Lang::tr{'wio_wanname'}</b></td>
> > >  	<td width='24%'
> > > align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td>
> > >  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> > > -	<td width='14%'
> > 
> > align='center'><b>$Lang::tr{'wio_wancheck'}</b></td>
> > > +	<td width='14%'
> > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > >  </tr>
> > >  <tr bgcolor='$color{'color22'}' height='20'>
> > >  	<td align='center'>01</td>
> > > @@ -1196,7 +1196,7 @@ print"
> > >  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
> > >  	<td width='25%'
> > > align='center'><b>$Lang::tr{'wio_common_name'}</b></td>
> > >  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> > > -	<td width='14%'
> > > align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> > > +	<td width='14%'
> > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > >  </tr>
> > >  ";
> > > 
> > > @@ -1244,7 +1244,7 @@ $statustxt = "$Lang::tr{'capsclosed'}";
> > >  		  <td align='center' height='20'>&nbsp;</td>
> > >  		  </tr>
> > >  ";
> > > -
> > > +
> > >  if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') {
> > >  	print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":"
> > > bgcolor='$color{'color22'}'")." height='20'><td>&nbsp;</td><td
> > 
> > colspan='16'
> > > align='left'>$vpnconfighash{$key}[25]</td></tr>";
> > >  }
> > > @@ -1278,7 +1278,7 @@ print"
> > >  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
> > >  	<td width='25%' align='center'><b>$Lang::tr{'common
> > 
> > name'}</b></td>
> > >  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> > > -	<td width='14%'
> > > align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> > > +	<td width='14%'
> > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > >  </tr>
> > >  ";
> > > 
> > > @@ -1310,7 +1310,6 @@ print"
> > >  			$statustxt = "$Lang::tr{'capsclosed'}";
> > >  		}
> > >  		else {
> > > -
> > >  			if ($ovpnconfighash{$key}[3] eq 'net') {
> > >  				if (-e
> > > "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
> > >  					my @output = "";
> > > @@ -1378,7 +1377,7 @@ print"
> > >  		if ($ovpnconfighash{$key}[25] &&
> > 
> > $wiosettings{'CLIENTREMARK'} eq
> > > 'on') {
> > >  			print"<tr".($idovpn % 2?"
> > > bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")."
> > > height='20'><td>&nbsp;</td><td colspan='16'
> > > align='left'>$ovpnconfighash{$key}[25]</td></tr>";
> > >  		}
> > > -
> > > +
> > >  		print"<tr height='1'><td colspan='17'
> > > bgcolor='#696565'></td></tr>";
> > >  		$idovpn++
> > >  	}
> > > @@ -1519,7 +1518,7 @@ my $dotip = length($ipaddresses[$a]) -
> > > rindex($ipaddresses[$a],'.');
> > >  		if ( -e "$vpnpid" ) {
> > >  			foreach $key (keys(%vpnconfighash)) {
> > >  				next unless ($vpnconfighash{$key}[3] eq
> > 
> > 'net');
> > > -
> > > +
> > >  				my $convertip =
> > > &General::ipcidr2msk($vpnconfighash{$key}[11]);
> > > 
> > >  				my @net = split ("/", $convertip); @@ -
> > 
> > 1538,16 +1537,15 @@ my
> > > $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
> > >  			@match = split ("/",
> > 
> > $ovpnsettings{'DOVPN_SUBNET'});
> > > 
> > >  			if ( &General::IpInSubnet($ipaddresses[$a],
> > > $match[0], $match[1]) ) {
> > > -				print"<td align='center'><img
> > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> > > -				last SWITCH;
> > > +				print"<td align='center'><img
> > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> > > +				last SWITCH;
> > >  			}
> > >  		}
> > > 
> > >  		if ( %ovpnccdconfhash ne '' ) {
> > >  			foreach $key (keys(%ovpnccdconfhash)) {
> > > -
> > > +
> > >  				my $convertip =
> > > &General::ipcidr2msk($ovpnccdconfhash{$key}[1]);
> > > -
> > >  				my @net = split ("/", $convertip);
> > > 
> > >  				$vpnn2nip = $net[0];
> > > @@ -1557,7 +1555,6 @@ my $dotip = length($ipaddresses[$a]) -
> > > rindex($ipaddresses[$a],'.');
> > >  					print"<td align='center'><img
> > > align='middle' src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN'
> > > /></td>";
> > >  					last SWITCH;
> > >  				}
> > > -
> > >  			}
> > >  		}
> > > 
> > > @@ -1567,7 +1564,7 @@ my $dotip = length($ipaddresses[$a]) -
> > > rindex($ipaddresses[$a],'.');
> > >  			chomp ($rednet[1]);
> > >  			my $red_netmask =
> > 
> > General::iporsubtodec($rednet[1]);
> > >  			my $red_netaddress =
> > > Network::get_netaddress("$rednet[0]/$red_netmask");
> > > -
> > > +
> > >  			if ( &General::IpInSubnet($ipaddresses[$a],
> > > $red_netaddress, $red_netmask) ) {
> > >  				print"<td align='center' height='20'><img
> > > src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}'
> > > title='$Lang::tr{'wio_red_lan'}' /></td>";
> > >  				last SWITCH;
> > > @@ -2165,23 +2162,24 @@ close(FILE);
> > > 
> > > 
> > > 
> > 
> > ##########################################################
> > ############
> > > ####### ###############################################
> > > 
> > > -sub SortByTunnelName
> > > -{
> > > -    if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> > > -        return -1;
> > > -    }
> > > -    elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> > > -        return 1;
> > > -    }
> > > -    else {
> > > -        return 0;
> > > -    }
> > > +sub SortByTunnelName {
> > > +
> > > +	if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> > > +		return -1;
> > > +	}
> > > +	elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> > > +		return 1;
> > > +	}
> > > +	else {
> > > +		return 0;
> > > +	}
> > > +
> > >  }
> > > 
> > > 
> > > 
> > 
> > ##########################################################
> > ############
> > > ####### ###############################################
> > > 
> > > -sub validSave
> > > -{
> > > +sub validSave {
> > > +
> > >  	if ( $wiosettings{'IPADR'} eq '' && $wiosettings{'PINGMETHODE'}
> > > eq
> > > 'ip' && $wiosettings{'DYNDNS'} eq '' ) {
> > >  		$errormessage = $Lang::tr{'wio_ip_empty'};
> > >  	}
> > > @@ -2207,4 +2205,5 @@ sub validSave
> > >  	if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) {
> > > $errormessage = &WIO::checkinto($wiosettings{'IPADR'},
> > > $wiosettings{'HOST'}, @current); }
> > > 
> > >  	if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'} =~
> > > s/,/&#44;/g; }
> > > +
> > >  }
> 
>
  
Stephan Feddersen March 1, 2018, 9:04 p.m. UTC | #3
hi Michael,

yes, ithink that ist he problem.

How can i correct this?

Upload a new /lfs/wio file with a new PAK_VER?

Best 

Stephan


> -----Original Message-----
> From: Michael Tremer [mailto:michael.tremer@ipfire.org]
> Sent: Wednesday, February 28, 2018 1:39 PM
> To: Stephan Feddersen <sfeddersen@ipfire.org>;
> development@lists.ipfire.org
> Subject: Re: [PATCH] WIO: Fix a problem with the Network-Table-Button
> 
> Hi,
> 
> I think you might have just forgotten to add the lfs/wio file to the commit in
> case you changed the version number already.
> 
> Is that possible?
> 
> Best,
> -Michael
> 
> On Wed, 2018-02-28 at 13:37 +0100, Stephan Feddersen wrote:
> > Hello,
> >
> > oh no, these patches should be included in the release version wio-1.3.2!
> >
> > Where did I make my mistake in setting to GIT?
> >
> > Best
> >
> > Stephan
> >
> > > -----Original Message-----
> > > From: Michael Tremer [mailto:michael.tremer@ipfire.org]
> > > Sent: Wednesday, February 28, 2018 1:01 PM
> > > To: Stephan Feddersen <sfeddersen@ipfire.org>;
> > > development@lists.ipfire.org
> > > Subject: Re: [PATCH] WIO: Fix a problem with the
> > > Network-Table-Button
> > >
> > > Hello,
> > >
> > > none of the both patches bumps the release version.
> > >
> > > Should this be a new release already or are you just collecting patches?
> > >
> > > Best,
> > > -Michael
> > >
> > > On Tue, 2018-02-27 at 17:20 +0100, Stephan Feddersen via Development
> > > wrote:
> > > > ---
> > > >  src/wio/wio.cgi | 69
> > > > ++++++++++++++++++++++++++++--------------------------
> > > > ---
> > > >  1 file changed, 34 insertions(+), 35 deletions(-)
> > > >
> > > > diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index
> > > > 8c43b04..c51910f
> > > > 100644
> > > > --- a/src/wio/wio.cgi
> > > > +++ b/src/wio/wio.cgi
> > > > @@ -21,7 +21,7 @@
> > > >  #
> > > >  #
> > > >
> > > >
> > >
> > >
> ##########################################################
> > > ############
> > > > #######
> > > > ##
> > > >  #
> > > > -# Version: 2018/01/05 14:34:23
> > > > +# Version: 2018/02/27 16:54:23
> > > >  #
> > > >  # This wio.cgi is based on the Code from the IPCop WIO Addon  #
> > > > and is extremly adapted to work with IPFire.
> > > > @@ -106,10 +106,10 @@ my $count = 0;  my $showcount = 0;
> > > >
> > > >  my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; -my
> > > > $clientimportbuttontext  = "$Lang::tr{'wio_show_table_on'}"; -my
> > > > $networksearchbuttontext  = "$Lang::tr{'wio_show_table_on'}";
> > > > +my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; my
> > > > +$networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
> > > >
> > > > -my ( $infomessage, $errormessage, $importmessage, $message ) =
> > > > '';
> > > > +my ( $message, $infomessage, $errormessage, $importmessage ) =
> > > > +'';
> > > >
> > > >  my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark,
> > > > $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output,
> > > > $write,
> > >
> > > $webinterface,
> > > >  	 $sendemailoff, $pingmethode, $online, $color, $bgcolor,
> > > > $exitcode, $id, $line, $interface, $counter, $vpnn2nip,
> > > > $vpnn2nmask, $ddns, $edc, @@ -280,7 +280,7 @@ if (
> > > > $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'}
> > > > ) {
> > > >
> > > >  ## show / hide arptable
> > > >
> > > > -if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') {
> > > > +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) {
> > > >  	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} )
> > > > {
> > > >  		$wiosettings{'WIOGUISHOWARPTABLE'} = 'off';
> > > >  		$arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; @@ -
> > >
> > > 309,11
> > > > +309,11 @@ if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq
> > > > 'clientimport' ) {  if (
> > > > $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'}
> > > > eq 'networksearch' ) {
> > > >  	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} )
> > > > {
> > > >  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off';
> > > > -		$clientimportbuttontext =
> > > > "$Lang::tr{'wio_show_table_on'}";
> > > > +		$networksearchbuttontext =
> > >
> > > "$Lang::tr{'wio_show_table_on'}";
> > > >  	}
> > > >  	else {
> > > >  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on';
> > > > -		$clientimportbuttontext =
> > > > "$Lang::tr{'wio_show_table_off'}";
> > > > +		$networksearchbuttontext =
> > >
> > > "$Lang::tr{'wio_show_table_off'}";
> > > >  	}
> > > >  }
> > > >
> > > > @@ -348,7 +348,7 @@ if ( $wiosettings{'ACTION'} eq
> > > > $Lang::tr{'wio_add'} )
> > >
> > > {
> > > >  	}
> > > >  }
> > > >
> > > > -## enable / disabel client || enable / disable dyndns || enable /
> > > > disable sendemailon || enable / disable sendemailoff || change ip
> > > > / fqdn
> > > > +## enable / disable client || enable / disable dyndns || enable /
> > > > +disable
> > > > sendemailon || enable / disable sendemailoff || change ip / fqdn
> > > >
> > > >  if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'}
> > > > ) { $edc = 'on'; }  if ( $wiosettings{'ACTION'} eq
> > > > $Lang::tr{'enable disable dyndns'} ) { $edd = 'on'; } @@ -983,7
> > > > +983,7 @@ for ($i=1; $i<=15; $i++) {
> > > >  	print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n";
> > > >  }
> > > >
> > > > -print"
> > > > +print"
> > > >  	</select>&nbsp;$Lang::tr{'wio sec'}</td>  </tr>  <tr><td
> > > > colspan='3'>&nbsp;</td></tr> @@ -1123,7 +1123,7 @@ print"
> > > >  	<td width='15%'
> > >
> > > align='center'><b>$Lang::tr{'wio_wanname'}</b></td>
> > > >  	<td width='24%'
> > > > align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td>
> > > >  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> > > > -	<td width='14%'
> > >
> > > align='center'><b>$Lang::tr{'wio_wancheck'}</b></td>
> > > > +	<td width='14%'
> > > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > > >  </tr>
> > > >  <tr bgcolor='$color{'color22'}' height='20'>
> > > >  	<td align='center'>01</td>
> > > > @@ -1196,7 +1196,7 @@ print"
> > > >  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
> > > >  	<td width='25%'
> > > > align='center'><b>$Lang::tr{'wio_common_name'}</b></td>
> > > >  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> > > > -	<td width='14%'
> > > > align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> > > > +	<td width='14%'
> > > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > > >  </tr>
> > > >  ";
> > > >
> > > > @@ -1244,7 +1244,7 @@ $statustxt = "$Lang::tr{'capsclosed'}";
> > > >  		  <td align='center' height='20'>&nbsp;</td>
> > > >  		  </tr>
> > > >  ";
> > > > -
> > > > +
> > > >  if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq
> 'on') {
> > > >  	print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":"
> > > > bgcolor='$color{'color22'}'")." height='20'><td>&nbsp;</td><td
> > >
> > > colspan='16'
> > > > align='left'>$vpnconfighash{$key}[25]</td></tr>";
> > > >  }
> > > > @@ -1278,7 +1278,7 @@ print"
> > > >  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
> > > >  	<td width='25%' align='center'><b>$Lang::tr{'common
> > >
> > > name'}</b></td>
> > > >  	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
> > > > -	<td width='14%'
> > > > align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> > > > +	<td width='14%'
> > > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > > >  </tr>
> > > >  ";
> > > >
> > > > @@ -1310,7 +1310,6 @@ print"
> > > >  			$statustxt = "$Lang::tr{'capsclosed'}";
> > > >  		}
> > > >  		else {
> > > > -
> > > >  			if ($ovpnconfighash{$key}[3] eq 'net') {
> > > >  				if (-e
> > > > "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
> > > >  					my @output = "";
> > > > @@ -1378,7 +1377,7 @@ print"
> > > >  		if ($ovpnconfighash{$key}[25] &&
> > >
> > > $wiosettings{'CLIENTREMARK'} eq
> > > > 'on') {
> > > >  			print"<tr".($idovpn % 2?"
> > > > bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")."
> > > > height='20'><td>&nbsp;</td><td colspan='16'
> > > > align='left'>$ovpnconfighash{$key}[25]</td></tr>";
> > > >  		}
> > > > -
> > > > +
> > > >  		print"<tr height='1'><td colspan='17'
> > > > bgcolor='#696565'></td></tr>";
> > > >  		$idovpn++
> > > >  	}
> > > > @@ -1519,7 +1518,7 @@ my $dotip = length($ipaddresses[$a]) -
> > > > rindex($ipaddresses[$a],'.');
> > > >  		if ( -e "$vpnpid" ) {
> > > >  			foreach $key (keys(%vpnconfighash)) {
> > > >  				next unless ($vpnconfighash{$key}[3] eq
> > >
> > > 'net');
> > > > -
> > > > +
> > > >  				my $convertip =
> > > > &General::ipcidr2msk($vpnconfighash{$key}[11]);
> > > >
> > > >  				my @net = split ("/", $convertip); @@ -
> > >
> > > 1538,16 +1537,15 @@ my
> > > > $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
> > > >  			@match = split ("/",
> > >
> > > $ovpnsettings{'DOVPN_SUBNET'});
> > > >
> > > >  			if ( &General::IpInSubnet($ipaddresses[$a],
> > > > $match[0], $match[1]) ) {
> > > > -				print"<td align='center'><img
> > > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> > > > -				last SWITCH;
> > > > +				print"<td align='center'><img
> > > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> > > > +				last SWITCH;
> > > >  			}
> > > >  		}
> > > >
> > > >  		if ( %ovpnccdconfhash ne '' ) {
> > > >  			foreach $key (keys(%ovpnccdconfhash)) {
> > > > -
> > > > +
> > > >  				my $convertip =
> > > > &General::ipcidr2msk($ovpnccdconfhash{$key}[1]);
> > > > -
> > > >  				my @net = split ("/", $convertip);
> > > >
> > > >  				$vpnn2nip = $net[0];
> > > > @@ -1557,7 +1555,6 @@ my $dotip = length($ipaddresses[$a]) -
> > > > rindex($ipaddresses[$a],'.');
> > > >  					print"<td align='center'><img
> align='middle'
> > > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN'
> > > > /></td>";
> > > >  					last SWITCH;
> > > >  				}
> > > > -
> > > >  			}
> > > >  		}
> > > >
> > > > @@ -1567,7 +1564,7 @@ my $dotip = length($ipaddresses[$a]) -
> > > > rindex($ipaddresses[$a],'.');
> > > >  			chomp ($rednet[1]);
> > > >  			my $red_netmask =
> > >
> > > General::iporsubtodec($rednet[1]);
> > > >  			my $red_netaddress =
> > > > Network::get_netaddress("$rednet[0]/$red_netmask");
> > > > -
> > > > +
> > > >  			if ( &General::IpInSubnet($ipaddresses[$a],
> > > > $red_netaddress, $red_netmask) ) {
> > > >  				print"<td align='center' height='20'><img
> > > > src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}'
> > > > title='$Lang::tr{'wio_red_lan'}' /></td>";
> > > >  				last SWITCH;
> > > > @@ -2165,23 +2162,24 @@ close(FILE);
> > > >
> > > >
> > > >
> > >
> > >
> ##########################################################
> > > ############
> > > > ####### ###############################################
> > > >
> > > > -sub SortByTunnelName
> > > > -{
> > > > -    if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> > > > -        return -1;
> > > > -    }
> > > > -    elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> > > > -        return 1;
> > > > -    }
> > > > -    else {
> > > > -        return 0;
> > > > -    }
> > > > +sub SortByTunnelName {
> > > > +
> > > > +	if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> > > > +		return -1;
> > > > +	}
> > > > +	elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> > > > +		return 1;
> > > > +	}
> > > > +	else {
> > > > +		return 0;
> > > > +	}
> > > > +
> > > >  }
> > > >
> > > >
> > > >
> > >
> > >
> ##########################################################
> > > ############
> > > > ####### ###############################################
> > > >
> > > > -sub validSave
> > > > -{
> > > > +sub validSave {
> > > > +
> > > >  	if ( $wiosettings{'IPADR'} eq '' && $wiosettings{'PINGMETHODE'}
> > > > eq 'ip' && $wiosettings{'DYNDNS'} eq '' ) {
> > > >  		$errormessage = $Lang::tr{'wio_ip_empty'};
> > > >  	}
> > > > @@ -2207,4 +2205,5 @@ sub validSave
> > > >  	if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) {
> > > > $errormessage = &WIO::checkinto($wiosettings{'IPADR'},
> > > > $wiosettings{'HOST'}, @current); }
> > > >
> > > >  	if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'} =~
> > > > s/,/&#44;/g; }
> > > > +
> > > >  }
> >
> >
  
Michael Tremer March 2, 2018, 7:20 a.m. UTC | #4
Yes, please just send another patch with an update version number and increment
PAK_VER.

Best,
-Michael

On Thu, 2018-03-01 at 11:04 +0100, Stephan Feddersen wrote:
> hi Michael,
> 
> yes, ithink that ist he problem.
> 
> How can i correct this?
> 
> Upload a new /lfs/wio file with a new PAK_VER?
> 
> Best 
> 
> Stephan
> 
> 
> > -----Original Message-----
> > From: Michael Tremer [mailto:michael.tremer@ipfire.org]
> > Sent: Wednesday, February 28, 2018 1:39 PM
> > To: Stephan Feddersen <sfeddersen@ipfire.org>;
> > development@lists.ipfire.org
> > Subject: Re: [PATCH] WIO: Fix a problem with the Network-Table-Button
> > 
> > Hi,
> > 
> > I think you might have just forgotten to add the lfs/wio file to the commit
> > in
> > case you changed the version number already.
> > 
> > Is that possible?
> > 
> > Best,
> > -Michael
> > 
> > On Wed, 2018-02-28 at 13:37 +0100, Stephan Feddersen wrote:
> > > Hello,
> > > 
> > > oh no, these patches should be included in the release version wio-1.3.2!
> > > 
> > > Where did I make my mistake in setting to GIT?
> > > 
> > > Best
> > > 
> > > Stephan
> > > 
> > > > -----Original Message-----
> > > > From: Michael Tremer [mailto:michael.tremer@ipfire.org]
> > > > Sent: Wednesday, February 28, 2018 1:01 PM
> > > > To: Stephan Feddersen <sfeddersen@ipfire.org>;
> > > > development@lists.ipfire.org
> > > > Subject: Re: [PATCH] WIO: Fix a problem with the
> > > > Network-Table-Button
> > > > 
> > > > Hello,
> > > > 
> > > > none of the both patches bumps the release version.
> > > > 
> > > > Should this be a new release already or are you just collecting patches?
> > > > 
> > > > Best,
> > > > -Michael
> > > > 
> > > > On Tue, 2018-02-27 at 17:20 +0100, Stephan Feddersen via Development
> > > > wrote:
> > > > > ---
> > > > >  src/wio/wio.cgi | 69
> > > > > ++++++++++++++++++++++++++++--------------------------
> > > > > ---
> > > > >  1 file changed, 34 insertions(+), 35 deletions(-)
> > > > > 
> > > > > diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index
> > > > > 8c43b04..c51910f
> > > > > 100644
> > > > > --- a/src/wio/wio.cgi
> > > > > +++ b/src/wio/wio.cgi
> > > > > @@ -21,7 +21,7 @@
> > > > >  #
> > > > >  #
> > > > > 
> > > > > 
> > > > 
> > > > 
> > 
> > ##########################################################
> > > > ############
> > > > > #######
> > > > > ##
> > > > >  #
> > > > > -# Version: 2018/01/05 14:34:23
> > > > > +# Version: 2018/02/27 16:54:23
> > > > >  #
> > > > >  # This wio.cgi is based on the Code from the IPCop WIO Addon  #
> > > > > and is extremly adapted to work with IPFire.
> > > > > @@ -106,10 +106,10 @@ my $count = 0;  my $showcount = 0;
> > > > > 
> > > > >  my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; -my
> > > > > $clientimportbuttontext  = "$Lang::tr{'wio_show_table_on'}"; -my
> > > > > $networksearchbuttontext  = "$Lang::tr{'wio_show_table_on'}";
> > > > > +my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; my
> > > > > +$networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
> > > > > 
> > > > > -my ( $infomessage, $errormessage, $importmessage, $message ) =
> > > > > '';
> > > > > +my ( $message, $infomessage, $errormessage, $importmessage ) =
> > > > > +'';
> > > > > 
> > > > >  my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark,
> > > > > $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output,
> > > > > $write,
> > > > 
> > > > $webinterface,
> > > > >  	 $sendemailoff, $pingmethode, $online, $color, $bgcolor,
> > > > > $exitcode, $id, $line, $interface, $counter, $vpnn2nip,
> > > > > $vpnn2nmask, $ddns, $edc, @@ -280,7 +280,7 @@ if (
> > > > > $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'}
> > > > > ) {
> > > > > 
> > > > >  ## show / hide arptable
> > > > > 
> > > > > -if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') {
> > > > > +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) {
> > > > >  	if ( $wiosettings{'ACTION'} eq
> > > > > $Lang::tr{'wio_show_table_off'} )
> > > > > {
> > > > >  		$wiosettings{'WIOGUISHOWARPTABLE'} = 'off';
> > > > >  		$arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; @@
> > > > > -
> > > > 
> > > > 309,11
> > > > > +309,11 @@ if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq
> > > > > 'clientimport' ) {  if (
> > > > > $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'}
> > > > > eq 'networksearch' ) {
> > > > >  	if ( $wiosettings{'ACTION'} eq
> > > > > $Lang::tr{'wio_show_table_off'} )
> > > > > {
> > > > >  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off';
> > > > > -		$clientimportbuttontext =
> > > > > "$Lang::tr{'wio_show_table_on'}";
> > > > > +		$networksearchbuttontext =
> > > > 
> > > > "$Lang::tr{'wio_show_table_on'}";
> > > > >  	}
> > > > >  	else {
> > > > >  		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on';
> > > > > -		$clientimportbuttontext =
> > > > > "$Lang::tr{'wio_show_table_off'}";
> > > > > +		$networksearchbuttontext =
> > > > 
> > > > "$Lang::tr{'wio_show_table_off'}";
> > > > >  	}
> > > > >  }
> > > > > 
> > > > > @@ -348,7 +348,7 @@ if ( $wiosettings{'ACTION'} eq
> > > > > $Lang::tr{'wio_add'} )
> > > > 
> > > > {
> > > > >  	}
> > > > >  }
> > > > > 
> > > > > -## enable / disabel client || enable / disable dyndns || enable /
> > > > > disable sendemailon || enable / disable sendemailoff || change ip
> > > > > / fqdn
> > > > > +## enable / disable client || enable / disable dyndns || enable /
> > > > > +disable
> > > > > sendemailon || enable / disable sendemailoff || change ip / fqdn
> > > > > 
> > > > >  if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'}
> > > > > ) { $edc = 'on'; }  if ( $wiosettings{'ACTION'} eq
> > > > > $Lang::tr{'enable disable dyndns'} ) { $edd = 'on'; } @@ -983,7
> > > > > +983,7 @@ for ($i=1; $i<=15; $i++) {
> > > > >  	print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n";
> > > > >  }
> > > > > 
> > > > > -print"
> > > > > +print"
> > > > >  	</select>&nbsp;$Lang::tr{'wio sec'}</td>  </tr>  <tr><td
> > > > > colspan='3'>&nbsp;</td></tr> @@ -1123,7 +1123,7 @@ print"
> > > > >  	<td width='15%'
> > > > 
> > > > align='center'><b>$Lang::tr{'wio_wanname'}</b></td>
> > > > >  	<td width='24%'
> > > > > align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td>
> > > > >  	<td width='11%' align='center'><b>$Lang::tr{'wio
> > > > > image'}</b></td>
> > > > > -	<td width='14%'
> > > > 
> > > > align='center'><b>$Lang::tr{'wio_wancheck'}</b></td>
> > > > > +	<td width='14%'
> > > > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > > > >  </tr>
> > > > >  <tr bgcolor='$color{'color22'}' height='20'>
> > > > >  	<td align='center'>01</td>
> > > > > @@ -1196,7 +1196,7 @@ print"
> > > > >  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
> > > > >  	<td width='25%'
> > > > > align='center'><b>$Lang::tr{'wio_common_name'}</b></td>
> > > > >  	<td width='11%' align='center'><b>$Lang::tr{'wio
> > > > > image'}</b></td>
> > > > > -	<td width='14%'
> > > > > align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> > > > > +	<td width='14%'
> > > > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > > > >  </tr>
> > > > >  ";
> > > > > 
> > > > > @@ -1244,7 +1244,7 @@ $statustxt = "$Lang::tr{'capsclosed'}";
> > > > >  		  <td align='center' height='20'>&nbsp;</td>
> > > > >  		  </tr>
> > > > >  ";
> > > > > -
> > > > > +
> > > > >  if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq
> > 
> > 'on') {
> > > > >  	print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":"
> > > > > bgcolor='$color{'color22'}'")." height='20'><td>&nbsp;</td><td
> > > > 
> > > > colspan='16'
> > > > > align='left'>$vpnconfighash{$key}[25]</td></tr>";
> > > > >  }
> > > > > @@ -1278,7 +1278,7 @@ print"
> > > > >  	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
> > > > >  	<td width='25%' align='center'><b>$Lang::tr{'common
> > > > 
> > > > name'}</b></td>
> > > > >  	<td width='11%' align='center'><b>$Lang::tr{'wio
> > > > > image'}</b></td>
> > > > > -	<td width='14%'
> > > > > align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
> > > > > +	<td width='14%'
> > > > > +align='center'><b>$Lang::tr{'wio_connected'}</b></td>
> > > > >  </tr>
> > > > >  ";
> > > > > 
> > > > > @@ -1310,7 +1310,6 @@ print"
> > > > >  			$statustxt = "$Lang::tr{'capsclosed'}";
> > > > >  		}
> > > > >  		else {
> > > > > -
> > > > >  			if ($ovpnconfighash{$key}[3] eq 'net') {
> > > > >  				if (-e
> > > > > "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
> > > > >  					my @output = "";
> > > > > @@ -1378,7 +1377,7 @@ print"
> > > > >  		if ($ovpnconfighash{$key}[25] &&
> > > > 
> > > > $wiosettings{'CLIENTREMARK'} eq
> > > > > 'on') {
> > > > >  			print"<tr".($idovpn % 2?"
> > > > > bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")."
> > > > > height='20'><td>&nbsp;</td><td colspan='16'
> > > > > align='left'>$ovpnconfighash{$key}[25]</td></tr>";
> > > > >  		}
> > > > > -
> > > > > +
> > > > >  		print"<tr height='1'><td colspan='17'
> > > > > bgcolor='#696565'></td></tr>";
> > > > >  		$idovpn++
> > > > >  	}
> > > > > @@ -1519,7 +1518,7 @@ my $dotip = length($ipaddresses[$a]) -
> > > > > rindex($ipaddresses[$a],'.');
> > > > >  		if ( -e "$vpnpid" ) {
> > > > >  			foreach $key (keys(%vpnconfighash)) {
> > > > >  				next unless ($vpnconfighash{$key}[3]
> > > > > eq
> > > > 
> > > > 'net');
> > > > > -
> > > > > +
> > > > >  				my $convertip =
> > > > > &General::ipcidr2msk($vpnconfighash{$key}[11]);
> > > > > 
> > > > >  				my @net = split ("/", $convertip); @@
> > > > > -
> > > > 
> > > > 1538,16 +1537,15 @@ my
> > > > > $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
> > > > >  			@match = split ("/",
> > > > 
> > > > $ovpnsettings{'DOVPN_SUBNET'});
> > > > > 
> > > > >  			if ( &General::IpInSubnet($ipaddresses[$a],
> > > > > $match[0], $match[1]) ) {
> > > > > -				print"<td align='center'><img
> > > > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> > > > > -				last SWITCH;
> > > > > +				print"<td align='center'><img
> > > > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
> > > > > +				last SWITCH;
> > > > >  			}
> > > > >  		}
> > > > > 
> > > > >  		if ( %ovpnccdconfhash ne '' ) {
> > > > >  			foreach $key (keys(%ovpnccdconfhash)) {
> > > > > -
> > > > > +
> > > > >  				my $convertip =
> > > > > &General::ipcidr2msk($ovpnccdconfhash{$key}[1]);
> > > > > -
> > > > >  				my @net = split ("/", $convertip);
> > > > > 
> > > > >  				$vpnn2nip = $net[0];
> > > > > @@ -1557,7 +1555,6 @@ my $dotip = length($ipaddresses[$a]) -
> > > > > rindex($ipaddresses[$a],'.');
> > > > >  					print"<td align='center'><img
> > 
> > align='middle'
> > > > > src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN'
> > > > > /></td>";
> > > > >  					last SWITCH;
> > > > >  				}
> > > > > -
> > > > >  			}
> > > > >  		}
> > > > > 
> > > > > @@ -1567,7 +1564,7 @@ my $dotip = length($ipaddresses[$a]) -
> > > > > rindex($ipaddresses[$a],'.');
> > > > >  			chomp ($rednet[1]);
> > > > >  			my $red_netmask =
> > > > 
> > > > General::iporsubtodec($rednet[1]);
> > > > >  			my $red_netaddress =
> > > > > Network::get_netaddress("$rednet[0]/$red_netmask");
> > > > > -
> > > > > +
> > > > >  			if ( &General::IpInSubnet($ipaddresses[$a],
> > > > > $red_netaddress, $red_netmask) ) {
> > > > >  				print"<td align='center'
> > > > > height='20'><img
> > > > > src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}'
> > > > > title='$Lang::tr{'wio_red_lan'}' /></td>";
> > > > >  				last SWITCH;
> > > > > @@ -2165,23 +2162,24 @@ close(FILE);
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > 
> > ##########################################################
> > > > ############
> > > > > ####### ###############################################
> > > > > 
> > > > > -sub SortByTunnelName
> > > > > -{
> > > > > -    if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> > > > > -        return -1;
> > > > > -    }
> > > > > -    elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> > > > > -        return 1;
> > > > > -    }
> > > > > -    else {
> > > > > -        return 0;
> > > > > -    }
> > > > > +sub SortByTunnelName {
> > > > > +
> > > > > +	if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
> > > > > +		return -1;
> > > > > +	}
> > > > > +	elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
> > > > > +		return 1;
> > > > > +	}
> > > > > +	else {
> > > > > +		return 0;
> > > > > +	}
> > > > > +
> > > > >  }
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > 
> > ##########################################################
> > > > ############
> > > > > ####### ###############################################
> > > > > 
> > > > > -sub validSave
> > > > > -{
> > > > > +sub validSave {
> > > > > +
> > > > >  	if ( $wiosettings{'IPADR'} eq '' &&
> > > > > $wiosettings{'PINGMETHODE'}
> > > > > eq 'ip' && $wiosettings{'DYNDNS'} eq '' ) {
> > > > >  		$errormessage = $Lang::tr{'wio_ip_empty'};
> > > > >  	}
> > > > > @@ -2207,4 +2205,5 @@ sub validSave
> > > > >  	if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) {
> > > > > $errormessage = &WIO::checkinto($wiosettings{'IPADR'},
> > > > > $wiosettings{'HOST'}, @current); }
> > > > > 
> > > > >  	if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'}
> > > > > =~
> > > > > s/,/&#44;/g; }
> > > > > +
> > > > >  }
> > > 
> > > 
> 
>
  

Patch

diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi
index 8c43b04..c51910f 100644
--- a/src/wio/wio.cgi
+++ b/src/wio/wio.cgi
@@ -21,7 +21,7 @@ 
 #                                                                             #
 ###############################################################################
 #
-# Version: 2018/01/05 14:34:23
+# Version: 2018/02/27 16:54:23
 #
 # This wio.cgi is based on the Code from the IPCop WIO Addon
 # and is extremly adapted to work with IPFire.
@@ -106,10 +106,10 @@  my $count = 0;
 my $showcount = 0;
 
 my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}";
-my $clientimportbuttontext  = "$Lang::tr{'wio_show_table_on'}";
-my $networksearchbuttontext  = "$Lang::tr{'wio_show_table_on'}";
+my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}";
+my $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
 
-my ( $infomessage, $errormessage, $importmessage, $message ) = '';
+my ( $message, $infomessage, $errormessage, $importmessage ) = '';
 
 my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write, $webinterface,
 	 $sendemailoff, $pingmethode, $online, $color, $bgcolor, $exitcode, $id, $line, $interface, $counter, $vpnn2nip, $vpnn2nmask, $ddns, $edc,
@@ -280,7 +280,7 @@  if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'} ) {
 
 ## show / hide arptable
 
-if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') {
+if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) {
 	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) {
 		$wiosettings{'WIOGUISHOWARPTABLE'} = 'off';
 		$arpbuttontext = "$Lang::tr{'wio_show_table_on'}";
@@ -309,11 +309,11 @@  if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'clientimport' ) {
 if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'networksearch' ) {
 	if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) {
 		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off';
-		$clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}";
+		$networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}";
 	}
 	else {
 		$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on';
-		$clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}";
+		$networksearchbuttontext = "$Lang::tr{'wio_show_table_off'}";
 	}
 }
 
@@ -348,7 +348,7 @@  if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} ) {
 	}
 }
 
-## enable / disabel client || enable / disable dyndns || enable / disable sendemailon || enable / disable sendemailoff || change ip / fqdn
+## enable / disable client || enable / disable dyndns || enable / disable sendemailon || enable / disable sendemailoff || change ip / fqdn
 
 if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'} ) { $edc = 'on'; }
 if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable dyndns'} ) { $edd = 'on'; }
@@ -983,7 +983,7 @@  for ($i=1; $i<=15; $i++) {
 	print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n";
 }
 
-print"	
+print"
 	</select>&nbsp;$Lang::tr{'wio sec'}</td>
 </tr>
 <tr><td colspan='3'>&nbsp;</td></tr>
@@ -1123,7 +1123,7 @@  print"
 	<td width='15%' align='center'><b>$Lang::tr{'wio_wanname'}</b></td>
 	<td width='24%' align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td>
 	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
-	<td width='14%' align='center'><b>$Lang::tr{'wio_wancheck'}</b></td>
+	<td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td>
 </tr>
 <tr bgcolor='$color{'color22'}' height='20'>
 	<td align='center'>01</td>
@@ -1196,7 +1196,7 @@  print"
 	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
 	<td width='25%' align='center'><b>$Lang::tr{'wio_common_name'}</b></td>
 	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
-	<td width='14%' align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
+	<td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td>
 </tr>
 ";
 
@@ -1244,7 +1244,7 @@  $statustxt = "$Lang::tr{'capsclosed'}";
 		  <td align='center' height='20'>&nbsp;</td>
 		  </tr>
 ";
- 
+
 if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') {
 	print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td>&nbsp;</td><td colspan='16' align='left'>$vpnconfighash{$key}[25]</td></tr>";
 }
@@ -1278,7 +1278,7 @@  print"
 	<td width='8%' align='center'><b>$Lang::tr{'type'}</b></td>
 	<td width='25%' align='center'><b>$Lang::tr{'common name'}</b></td>
 	<td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td>
-	<td width='14%' align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td>
+	<td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td>
 </tr>
 ";
 
@@ -1310,7 +1310,6 @@  print"
 			$statustxt = "$Lang::tr{'capsclosed'}";
 		}
 		else {
-			
 			if ($ovpnconfighash{$key}[3] eq 'net') {
 				if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
 					my @output = "";
@@ -1378,7 +1377,7 @@  print"
 		if ($ovpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') {
 			print"<tr".($idovpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td>&nbsp;</td><td colspan='16' align='left'>$ovpnconfighash{$key}[25]</td></tr>";
 		}
-		
+
 		print"<tr height='1'><td colspan='17' bgcolor='#696565'></td></tr>";
 		$idovpn++
 	}
@@ -1519,7 +1518,7 @@  my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
 		if ( -e "$vpnpid" ) {
 			foreach $key (keys(%vpnconfighash)) {
 				next unless ($vpnconfighash{$key}[3] eq 'net');
-				
+
 				my $convertip = &General::ipcidr2msk($vpnconfighash{$key}[11]);
 
 				my @net = split ("/", $convertip);
@@ -1538,16 +1537,15 @@  my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
 			@match = split ("/", $ovpnsettings{'DOVPN_SUBNET'});
 
 			if ( &General::IpInSubnet($ipaddresses[$a], $match[0], $match[1]) ) {
-				print"<td align='center'><img src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>"; 
-				last SWITCH; 
+				print"<td align='center'><img src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
+				last SWITCH;
 			}
 		}
 
 		if ( %ovpnccdconfhash ne '' ) {
 			foreach $key (keys(%ovpnccdconfhash)) {
-								
+
 				my $convertip = &General::ipcidr2msk($ovpnccdconfhash{$key}[1]);
-							
 				my @net = split ("/", $convertip);
 
 				$vpnn2nip = $net[0];
@@ -1557,7 +1555,6 @@  my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
 					print"<td align='center'><img align='middle' src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>";
 					last SWITCH;
 				}
-					
 			}
 		}
 
@@ -1567,7 +1564,7 @@  my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
 			chomp ($rednet[1]);
 			my $red_netmask = General::iporsubtodec($rednet[1]);
 			my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask");
-						
+
 			if ( &General::IpInSubnet($ipaddresses[$a], $red_netaddress, $red_netmask) ) {
 				print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}' title='$Lang::tr{'wio_red_lan'}' /></td>";
 				last SWITCH;
@@ -2165,23 +2162,24 @@  close(FILE);
 
 ############################################################################################################################
 
-sub SortByTunnelName
-{
-    if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
-        return -1;
-    }
-    elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
-        return 1;
-    }
-    else {
-        return 0;
-    }
+sub SortByTunnelName {
+
+	if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) {
+		return -1;
+	}
+	elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) {
+		return 1;
+	}
+	else {
+		return 0;
+	}
+
 }
 
 ############################################################################################################################
 
-sub validSave
-{
+sub validSave {
+
 	if ( $wiosettings{'IPADR'} eq '' && $wiosettings{'PINGMETHODE'} eq 'ip' && $wiosettings{'DYNDNS'} eq '' ) {
 		$errormessage = $Lang::tr{'wio_ip_empty'};
 	}
@@ -2207,4 +2205,5 @@  sub validSave
 	if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) { $errormessage = &WIO::checkinto($wiosettings{'IPADR'}, $wiosettings{'HOST'}, @current); }
 
 	if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'} =~ s/,/&#44;/g; }
+
 }