WIO: wio.cgi edit how to get the ips for the networks
Message ID | 1502803055-18669-1-git-send-email-sfeddersen@ipfire.org |
---|---|
State | Accepted |
Commit | 1bee37ba2cd744820cc16133e4703b2df3a2892f |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id 35D8E61C32 for <patchwork@ipfire.org>; Tue, 15 Aug 2017 15:17:49 +0200 (CEST) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 0B1C41E3F; Tue, 15 Aug 2017 15:17:47 +0200 (CEST) Received: from ubuntu.stflan.home (p5496EA65.dip0.t-ipconnect.de [84.150.234.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id A1EC7180C; Tue, 15 Aug 2017 15:17:46 +0200 (CEST) From: Stephan Feddersen <sfeddersen@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] WIO: wio.cgi edit how to get the ips for the networks Date: Tue, 15 Aug 2017 15:17:35 +0200 Message-Id: <1502803055-18669-1-git-send-email-sfeddersen@ipfire.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <http://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <http://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Cc: Stephan Feddersen <sfeddersen@ipfire.org> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Message
Stephan Feddersen
Aug. 15, 2017, 11:17 p.m. UTC
--- lfs/wio | 2 +- src/wio/lang/wio.de.pl | 1 + src/wio/lang/wio.en.pl | 1 + src/wio/wio.cgi | 19 +++++-------------- 4 files changed, 8 insertions(+), 15 deletions(-)
Comments
Hello Stephan, thanks for the patch. I just merged everything for Core Update 113 this morning. So including this patch, this will hopefully be the final version that is going to be released. Best, -Michael On Tue, 2017-08-15 at 15:17 +0200, Stephan Feddersen wrote: > --- > lfs/wio | 2 +- > src/wio/lang/wio.de.pl | 1 + > src/wio/lang/wio.en.pl | 1 + > src/wio/wio.cgi | 19 +++++-------------- > 4 files changed, 8 insertions(+), 15 deletions(-) > > diff --git a/lfs/wio b/lfs/wio > index a3c00d9..25726cd 100644 > --- a/lfs/wio > +++ b/lfs/wio > @@ -15,7 +15,7 @@ THISAPP = wio-$(VER) > DIR_APP = $(DIR_SRC)/$(THISAPP) > TARGET = $(DIR_INFO)/$(THISAPP) > PROG = wio > -PAK_VER = 1 > +PAK_VER = 2 > > #################################################################### > ########### > # Top-level Rules > diff --git a/src/wio/lang/wio.de.pl b/src/wio/lang/wio.de.pl > index 430284e..fd82ff0 100644 > --- a/src/wio/lang/wio.de.pl > +++ b/src/wio/lang/wio.de.pl > @@ -97,6 +97,7 @@ > 'wio_iface' => 'Schnittstelle', > 'wio_client_enable' => 'Client aktivieren?', > 'wio_ping_send' => 'überprüfen per', > +'wio_link_open' => 'Link öffnen per', > 'enable disable client' => 'Client aktivieren oder deaktivieren', > 'wio_client_on' => 'Überwachung aktiviert (klicken, um zu > deaktivieren)', > 'wio_client_off' => 'Überwachung deaktiviert (klicken, um zu > aktivieren)', > diff --git a/src/wio/lang/wio.en.pl b/src/wio/lang/wio.en.pl > index 17312a7..52793b9 100644 > --- a/src/wio/lang/wio.en.pl > +++ b/src/wio/lang/wio.en.pl > @@ -97,6 +97,7 @@ > 'wio_iface' => 'Interface', > 'wio_client_enable' => 'enable Host ?', > 'wio_ping_send' => 'send ping to', > +'wio_link_open' => 'open link via', > 'enable disable client' => 'enable or disable client', > 'wio_client_on' => 'Client enabled (click to disable)', > 'wio_client_off' => 'Client disabled (click to enable)', > diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi > index 631e468..aa471e6 100644 > --- a/src/wio/wio.cgi > +++ b/src/wio/wio.cgi > @@ -47,6 +47,7 @@ use Fatal qw/ open /; > use Net::Telnet; > > require '/var/ipfire/general-functions.pl'; > +require '/var/ipfire/network-functions.pl'; > require '/var/ipfire/lang.pl'; > require '/var/ipfire/header.pl'; > require '/usr/lib/wio/wio-lib.pl'; > @@ -166,18 +167,8 @@ if ( -e $wiofile ) { goto WIOSCAN; } > ## get network ips > foreach (@devs_color) { > if ( $netsettings{"${_}_DEV"} ne '' ) { > - > - $wiosettings{"${_}_IPLOW"} = inet_ntoa pack q/N/, > (unpack (q/N/, inet_aton ($netsettings{"${_}_NETADDRESS"}))+1); > - my @addrarr = > split(/\./,$netsettings{"${_}_ADDRESS"}); > - my $ipaddress = unpack( "N", pack( "C4",@addrarr ) > ); > - > - my @maskarr = > split(/\./,$netsettings{"${_}_NETMASK"}); > - my $netmask = unpack( "N", pack( "C4",@maskarr ) ); > - > - my $bcast = ( $ipaddress & $netmask ) + ( ~ $netmask > ); > - my @bcastarr = inet_ntoa pack q/N/, (unpack (q/N/, > inet_aton ($bcast))-1); > - > - $wiosettings{"${_}_IPHIGH"} = join(".",@bcastarr); > + $wiosettings{"${_}_IPLOW"} = > &Network::find_next_ip_address($netsettings{"${_}_NETADDRESS"}, 1); > + $wiosettings{"${_}_IPHIGH"} = > &Network::find_next_ip_address($netsettings{"${_}_BROADCAST"}, -1); > } > } > > @@ -712,7 +703,7 @@ else { > print" > </tr> > <tr> > - <td height='30'>$Lang::tr{'wio_ping_send'}:</td> > + <td height='30'>$Lang::tr{'wio_link_open'}:</td> > <td align='left' colspan='5'> > <select size='1' name='WEBINTERFACE$count' > width='80' style='width: 80px'> > <option value='----' > $selected{'WEBINTERFACE$count'}{'----'}>----</option> > @@ -1713,7 +1704,7 @@ else { > print" > </tr> > <tr> > - <td height='30'>$Lang::tr{'wio_ping_send'}:</td> > + <td height='30'>$Lang::tr{'wio_link_open'}:</td> > <td align='left' colspan='5'> > <select size='1' name='WEBINTERFACE' width='80' > style='width: 80px'> > <option value='----' $selected{'WEBINTERFACE'}{'-- > --'}>----</option>