From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] WIO: Fix a problem with the Network-Table-Button Date: Thu, 01 Mar 2018 20:20:46 +0000 Message-ID: <1519935646.11896.53.camel@ipfire.org> In-Reply-To: <001001d3b144$b15dbfc0$14193f40$@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1377594656448095834==" List-Id: --===============1377594656448095834== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Yes, please just send another patch with an update version number and increme= nt PAK_VER. Best, -Michael On Thu, 2018-03-01 at 11:04 +0100, Stephan Feddersen wrote: > hi Michael, >=20 > yes, ithink that ist he problem. >=20 > How can i correct this? >=20 > Upload a new /lfs/wio file with a new PAK_VER? >=20 > Best=20 >=20 > Stephan >=20 >=20 > > -----Original Message----- > > From: Michael Tremer [mailto:michael.tremer(a)ipfire.org] > > Sent: Wednesday, February 28, 2018 1:39 PM > > To: Stephan Feddersen ; > > development(a)lists.ipfire.org > > Subject: Re: [PATCH] WIO: Fix a problem with the Network-Table-Button > >=20 > > Hi, > >=20 > > I think you might have just forgotten to add the lfs/wio file to the comm= it > > in > > case you changed the version number already. > >=20 > > Is that possible? > >=20 > > Best, > > -Michael > >=20 > > On Wed, 2018-02-28 at 13:37 +0100, Stephan Feddersen wrote: > > > Hello, > > >=20 > > > oh no, these patches should be included in the release version wio-1.3.= 2! > > >=20 > > > Where did I make my mistake in setting to GIT? > > >=20 > > > Best > > >=20 > > > Stephan > > >=20 > > > > -----Original Message----- > > > > From: Michael Tremer [mailto:michael.tremer(a)ipfire.org] > > > > Sent: Wednesday, February 28, 2018 1:01 PM > > > > To: Stephan Feddersen ; > > > > development(a)lists.ipfire.org > > > > Subject: Re: [PATCH] WIO: Fix a problem with the > > > > Network-Table-Button > > > >=20 > > > > Hello, > > > >=20 > > > > none of the both patches bumps the release version. > > > >=20 > > > > Should this be a new release already or are you just collecting patch= es? > > > >=20 > > > > Best, > > > > -Michael > > > >=20 > > > > 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(-) > > > > >=20 > > > > > 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 @@ > > > > > # > > > > > # > > > > >=20 > > > > >=20 > > > >=20 > > > >=20 > >=20 > > ########################################################## > > > > ############ > > > > > ####### > > > > > ## > > > > > # > > > > > -# 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 =3D 0; my $showcount =3D 0; > > > > >=20 > > > > > my $arpbuttontext =3D "$Lang::tr{'wio_show_table_on'}"; -my > > > > > $clientimportbuttontext =3D "$Lang::tr{'wio_show_table_on'}"; -my > > > > > $networksearchbuttontext =3D "$Lang::tr{'wio_show_table_on'}"; > > > > > +my $clientimportbuttontext =3D "$Lang::tr{'wio_show_table_on'}"; my > > > > > +$networksearchbuttontext =3D "$Lang::tr{'wio_show_table_on'}"; > > > > >=20 > > > > > -my ( $infomessage, $errormessage, $importmessage, $message ) =3D > > > > > ''; > > > > > +my ( $message, $infomessage, $errormessage, $importmessage ) =3D > > > > > +''; > > > > >=20 > > > > > my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, > > > > > $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, > > > > > $write, > > > >=20 > > > > $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'} > > > > > ) { > > > > >=20 > > > > > ## show / hide arptable > > > > >=20 > > > > > -if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') { > > > > > +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) { > > > > > if ( $wiosettings{'ACTION'} eq > > > > > $Lang::tr{'wio_show_table_off'} ) > > > > > { > > > > > $wiosettings{'WIOGUISHOWARPTABLE'} =3D 'off'; > > > > > $arpbuttontext =3D "$Lang::tr{'wio_show_table_on'}"; @@ > > > > > - > > > >=20 > > > > 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'} =3D 'off'; > > > > > - $clientimportbuttontext =3D > > > > > "$Lang::tr{'wio_show_table_on'}"; > > > > > + $networksearchbuttontext =3D > > > >=20 > > > > "$Lang::tr{'wio_show_table_on'}"; > > > > > } > > > > > else { > > > > > $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} =3D 'on'; > > > > > - $clientimportbuttontext =3D > > > > > "$Lang::tr{'wio_show_table_off'}"; > > > > > + $networksearchbuttontext =3D > > > >=20 > > > > "$Lang::tr{'wio_show_table_off'}"; > > > > > } > > > > > } > > > > >=20 > > > > > @@ -348,7 +348,7 @@ if ( $wiosettings{'ACTION'} eq > > > > > $Lang::tr{'wio_add'} ) > > > >=20 > > > > { > > > > > } > > > > > } > > > > >=20 > > > > > -## 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 > > > > >=20 > > > > > if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'} > > > > > ) { $edc =3D 'on'; } if ( $wiosettings{'ACTION'} eq > > > > > $Lang::tr{'enable disable dyndns'} ) { $edd =3D 'on'; } @@ -983,7 > > > > > +983,7 @@ for ($i=3D1; $i<=3D15; $i++) { > > > > > print "\n"; > > > > > } > > > > >=20 > > > > > -print" > > > > > +print" > > > > >  $Lang::tr{'wio sec'} > > > > colspan=3D'3'>  @@ -1123,7 +1123,7 @@ print" > > > > > > > >=20 > > > > align=3D'center'>$Lang::tr{'wio_wanname'} > > > > > > > > > align=3D'center'>$Lang::tr{'wio_dyndns_hosts'} > > > > > $Lang::tr{'wio > > > > > image'} > > > > > - > > >=20 > > > > align=3D'center'>$Lang::tr{'wio_wancheck'} > > > > > + > > > > +align=3D'center'>$Lang::tr{'wio_connected'} > > > > > > > > > > > > > > > 01 > > > > > @@ -1196,7 +1196,7 @@ print" > > > > > $Lang::tr{'type'} > > > > > > > > > align=3D'center'>$Lang::tr{'wio_common_name'} > > > > > $Lang::tr{'wio > > > > > image'} > > > > > - > > > > align=3D'center'>$Lang::tr{'wio_ovpn_connected'} > > > > > + > > > > +align=3D'center'>$Lang::tr{'wio_connected'} > > > > > > > > > > "; > > > > >=20 > > > > > @@ -1244,7 +1244,7 @@ $statustxt =3D "$Lang::tr{'capsclosed'}"; > > > > >   > > > > > > > > > > "; > > > > > - > > > > > + > > > > > if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq > >=20 > > 'on') { > > > > > print" > > > > bgcolor=3D'$color{'color22'}'")." height=3D'20'>  > > >=20 > > > > colspan=3D'16' > > > > > align=3D'left'>$vpnconfighash{$key}[25]"; > > > > > } > > > > > @@ -1278,7 +1278,7 @@ print" > > > > > $Lang::tr{'type'} > > > > > $Lang::tr{'common > > > >=20 > > > > name'} > > > > > $Lang::tr{'wio > > > > > image'} > > > > > - > > > > align=3D'center'>$Lang::tr{'wio_ovpn_connected'} > > > > > + > > > > +align=3D'center'>$Lang::tr{'wio_connected'} > > > > > > > > > > "; > > > > >=20 > > > > > @@ -1310,7 +1310,6 @@ print" > > > > > $statustxt =3D "$Lang::tr{'capsclosed'}"; > > > > > } > > > > > else { > > > > > - > > > > > if ($ovpnconfighash{$key}[3] eq 'net') { > > > > > if (-e > > > > > "/var/run/$ovpnconfighash{$key}[1]n2n.pid") { > > > > > my @output =3D ""; > > > > > @@ -1378,7 +1377,7 @@ print" > > > > > if ($ovpnconfighash{$key}[25] && > > > >=20 > > > > $wiosettings{'CLIENTREMARK'} eq > > > > > 'on') { > > > > > print" > > > > bgcolor=3D'$color{'color20'}'":" bgcolor=3D'$color{'color22'}'")." > > > > > height=3D'20'>  > > > > align=3D'left'>$ovpnconfighash{$key}[25]"; > > > > > } > > > > > - > > > > > + > > > > > print" > > > > bgcolor=3D'#696565'>"; > > > > > $idovpn++ > > > > > } > > > > > @@ -1519,7 +1518,7 @@ my $dotip =3D length($ipaddresses[$a]) - > > > > > rindex($ipaddresses[$a],'.'); > > > > > if ( -e "$vpnpid" ) { > > > > > foreach $key (keys(%vpnconfighash)) { > > > > > next unless ($vpnconfighash{$key}[3] > > > > > eq > > > >=20 > > > > 'net'); > > > > > - > > > > > + > > > > > my $convertip =3D > > > > > &General::ipcidr2msk($vpnconfighash{$key}[11]); > > > > >=20 > > > > > my @net =3D split ("/", $convertip); @@ > > > > > - > > > >=20 > > > > 1538,16 +1537,15 @@ my > > > > > $dotip =3D length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); > > > > > @match =3D split ("/", > > > >=20 > > > > $ovpnsettings{'DOVPN_SUBNET'}); > > > > >=20 > > > > > if ( &General::IpInSubnet($ipaddresses[$a], > > > > > $match[0], $match[1]) ) { > > > > > - print" > > > > src=3D'$imgstatic/ovpn.png' alt=3D'OpenVPN' title=3D'OpenVPN' />"; > > > > > - last SWITCH; > > > > > + print" > > > > src=3D'$imgstatic/ovpn.png' alt=3D'OpenVPN' title=3D'OpenVPN' />"; > > > > > + last SWITCH; > > > > > } > > > > > } > > > > >=20 > > > > > if ( %ovpnccdconfhash ne '' ) { > > > > > foreach $key (keys(%ovpnccdconfhash)) { > > > > > - > > > > > + > > > > > my $convertip =3D > > > > > &General::ipcidr2msk($ovpnccdconfhash{$key}[1]); > > > > > - > > > > > my @net =3D split ("/", $convertip); > > > > >=20 > > > > > $vpnn2nip =3D $net[0]; > > > > > @@ -1557,7 +1555,6 @@ my $dotip =3D length($ipaddresses[$a]) - > > > > > rindex($ipaddresses[$a],'.'); > > > > > print" >=20 > > align=3D'middle' > > > > > src=3D'$imgstatic/ovpn.png' alt=3D'OpenVPN' title=3D'OpenVPN' > > > > > />"; > > > > > last SWITCH; > > > > > } > > > > > - > > > > > } > > > > > } > > > > >=20 > > > > > @@ -1567,7 +1564,7 @@ my $dotip =3D length($ipaddresses[$a]) - > > > > > rindex($ipaddresses[$a],'.'); > > > > > chomp ($rednet[1]); > > > > > my $red_netmask =3D > > > >=20 > > > > General::iporsubtodec($rednet[1]); > > > > > my $red_netaddress =3D > > > > > Network::get_netaddress("$rednet[0]/$red_netmask"); > > > > > - > > > > > + > > > > > if ( &General::IpInSubnet($ipaddresses[$a], > > > > > $red_netaddress, $red_netmask) ) { > > > > > print" > > > > height=3D'20'> > > > > src=3D'$imgstatic/red.png' alt=3D'$Lang::tr{'wio_red_lan'}' > > > > > title=3D'$Lang::tr{'wio_red_lan'}' />"; > > > > > last SWITCH; > > > > > @@ -2165,23 +2162,24 @@ close(FILE); > > > > >=20 > > > > >=20 > > > > >=20 > > > >=20 > > > >=20 > >=20 > > ########################################################## > > > > ############ > > > > > ####### ############################################### > > > > >=20 > > > > > -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; > > > > > + } > > > > > + > > > > > } > > > > >=20 > > > > >=20 > > > > >=20 > > > >=20 > > > >=20 > >=20 > > ########################################################## > > > > ############ > > > > > ####### ############################################### > > > > >=20 > > > > > -sub validSave > > > > > -{ > > > > > +sub validSave { > > > > > + > > > > > if ( $wiosettings{'IPADR'} eq '' && > > > > > $wiosettings{'PINGMETHODE'} > > > > > eq 'ip' && $wiosettings{'DYNDNS'} eq '' ) { > > > > > $errormessage =3D $Lang::tr{'wio_ip_empty'}; > > > > > } > > > > > @@ -2207,4 +2205,5 @@ sub validSave > > > > > if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) { > > > > > $errormessage =3D &WIO::checkinto($wiosettings{'IPADR'}, > > > > > $wiosettings{'HOST'}, @current); } > > > > >=20 > > > > > if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'} > > > > > =3D~ > > > > > s/,/,/g; } > > > > > + > > > > > } > > >=20 > > >=20 >=20 >=20 --===============1377594656448095834==--