From: Arne Fitzenreiter Date: Wed, 26 Feb 2014 16:59:53 +0000 (+0100) Subject: Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=adce3f96fc5c0b817d2742eed6065706aef9e210;hp=78f10eafe07b317f784d7e41487645672681109b Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next --- diff --git a/config/httpd/vhosts.d/ipfire-interface-ssl.conf b/config/httpd/vhosts.d/ipfire-interface-ssl.conf index cc3cb1d90..dc6bb21ed 100644 --- a/config/httpd/vhosts.d/ipfire-interface-ssl.conf +++ b/config/httpd/vhosts.d/ipfire-interface-ssl.conf @@ -9,7 +9,8 @@ TransferLog /var/log/httpd/access_log SSLEngine on SSLProtocol all -SSLv2 - SSLCipherSuite ALL:!ADH:!EXPORT56:!eNULL:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP + SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128:AES256:HIGH:!RC4:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK + SSLHonorCipherOrder on SSLCertificateFile /etc/httpd/server.crt SSLCertificateKeyFile /etc/httpd/server.key diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts index 531e612a7..bf4dd529a 100644 --- a/config/rootfiles/common/armv5tel/initscripts +++ b/config/rootfiles/common/armv5tel/initscripts @@ -81,7 +81,6 @@ etc/rc.d/init.d/networking/red.up/05-RS-dnsmasq etc/rc.d/init.d/networking/red.up/10-miniupnpd etc/rc.d/init.d/networking/red.up/10-multicast etc/rc.d/init.d/networking/red.up/20-RL-firewall -etc/rc.d/init.d/networking/red.up/22-forwardfwctrl etc/rc.d/init.d/networking/red.up/23-RS-snort etc/rc.d/init.d/networking/red.up/24-RS-qos etc/rc.d/init.d/networking/red.up/27-RS-squid diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts index a3acc1fb6..3b91181d0 100644 --- a/config/rootfiles/common/i586/initscripts +++ b/config/rootfiles/common/i586/initscripts @@ -83,7 +83,6 @@ etc/rc.d/init.d/networking/red.up/05-RS-dnsmasq etc/rc.d/init.d/networking/red.up/10-miniupnpd etc/rc.d/init.d/networking/red.up/10-multicast etc/rc.d/init.d/networking/red.up/20-RL-firewall -etc/rc.d/init.d/networking/red.up/22-forwardfwctrl etc/rc.d/init.d/networking/red.up/23-RS-snort etc/rc.d/init.d/networking/red.up/24-RS-qos etc/rc.d/init.d/networking/red.up/27-RS-squid diff --git a/config/rootfiles/core/76/filelists/firewall b/config/rootfiles/core/76/filelists/firewall index 1c5819180..e770307c1 100644 --- a/config/rootfiles/core/76/filelists/firewall +++ b/config/rootfiles/core/76/filelists/firewall @@ -1,5 +1,4 @@ etc/rc.d/init.d/firewall -etc/rc.d/init.d/networking/red.up/22-forwardfwctrl srv/web/ipfire/cgi-bin/firewall.cgi srv/web/ipfire/cgi-bin/fwhosts.cgi srv/web/ipfire/cgi-bin/optionsfw.cgi diff --git a/config/rootfiles/core/76/update.sh b/config/rootfiles/core/76/update.sh index 2da9408e2..150045bfe 100644 --- a/config/rootfiles/core/76/update.sh +++ b/config/rootfiles/core/76/update.sh @@ -204,6 +204,9 @@ rm -f /usr/sbin/ntptime rm -f /usr/sbin/ntptrace rm -f /usr/sbin/tickadj +# Remove old firewall helper link +rm -f /etc/rc.d/init.d/networking/red.up/22-forwardfwctrl + # #Extract files tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C / diff --git a/html/cgi-bin/aliases.cgi b/html/cgi-bin/aliases.cgi index 8d6b19d4b..09f6ea370 100644 --- a/html/cgi-bin/aliases.cgi +++ b/html/cgi-bin/aliases.cgi @@ -241,16 +241,16 @@ my %checked =(); # Checkbox manipulations if ($errormessage) { &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); - print "$errormessage "; + print "$errormessage "; &Header::closebox(); } unless (( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ ) && ($netsettings{'RED_TYPE'} eq 'STATIC')) { &Header::openbox('100%', 'left', $Lang::tr{'capswarning'}); print < + - +
$Lang::tr{'aliases not active'}$Lang::tr{'aliases not active'}
END @@ -275,23 +275,22 @@ if ($settings{'KEY1'} ne '') { print < - +
- + - + - +
$Lang::tr{'name'}: *$Lang::tr{'name'}: * $Lang::tr{'alias ip'}: $Lang::tr{'alias ip'}:  $Lang::tr{'enabled'} $Lang::tr{'enabled'} 


- +
- - - + +
* $Lang::tr{'this field may be blank'}* $Lang::tr{'this field may be blank'}
@@ -320,11 +319,11 @@ if ($netsettings{'SORT_ALIASES'} eq 'NAMERev') { # &Header::openbox('100%', 'left', $Lang::tr{'current aliases'}); print < + - - - + + + END ; @@ -354,21 +353,19 @@ foreach my $line (@current) { #Colorize each line if ($settings{'KEY1'} eq $key) { - print ""; - $col="bgcolor='${Header::colouryellow}'"; + $col="background-color:${Header::colouryellow};"; } elsif ($key % 2) { - print ""; - $col="bgcolor='${Header::table2colour}'"; + $col="background-color:${Header::table2colour};"; } else { - print ""; - $col="bgcolor='${Header::table1colour}'"; + $col="background-color:${Header::table1colour};"; } + print ""; print <$temp[2] - + + - - - - - +
$Lang::tr{'name'} $sortarrow1$Lang::tr{'alias ip'} $sortarrow2$Lang::tr{'action'}$Lang::tr{'name'} $sortarrow1$Lang::tr{'alias ip'} $sortarrow2$Lang::tr{'action'}
$temp[0]$temp[2]$temp[0] +
@@ -376,7 +373,7 @@ foreach my $line (@current) {
+
@@ -384,7 +381,7 @@ foreach my $line (@current) {
+
@@ -514,3 +511,4 @@ sub BuildConfiguration { # Restart service associated with this system '/usr/local/bin/setaliases'; } + diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index d566cf7eb..c7220f62d 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -282,34 +282,34 @@ if (-e "${General::swroot}/ovpn/n2nconf") { # Print legend. print < + - - - - - - - - -
- $Lang::tr{'legend'} : + + $Lang::tr{'legend'} : - $Lang::tr{'lan'} + + $Lang::tr{'lan'} - $Lang::tr{'internet'} + + $Lang::tr{'internet'} - $Lang::tr{'dmz'} + + $Lang::tr{'dmz'} - $Lang::tr{'wireless'} + + $Lang::tr{'wireless'} - IPFire + + IPFire - $Lang::tr{'vpn'} + + $Lang::tr{'vpn'} - $Lang::tr{'OpenVPN'} + + $Lang::tr{'OpenVPN'} - Multicast + + Multicast
@@ -345,60 +345,60 @@ END # Print table header. print < -
- - + + + - - - - - - - + - - - - - @@ -523,17 +523,17 @@ foreach my $line (@conntrack) { my $sip_extra; if ($sip ne $sip_ret) { - $sip_extra = "> "; + $sip_extra = "> "; $sip_extra .= ""; - $sip_extra .= " $sip_ret"; + $sip_extra .= " $sip_ret"; $sip_extra .= ""; } my $dip_extra; if ($dip ne $dip_ret) { - $dip_extra = "> "; + $dip_extra = "> "; $dip_extra .= ""; - $dip_extra .= " $dip_ret"; + $dip_extra .= " $dip_ret"; $dip_extra .= ""; } @@ -545,9 +545,9 @@ foreach my $line (@conntrack) { $sserv_ret = uc(getservbyport($sport_ret, lc($l4proto))); } - $sport_extra = "> "; + $sport_extra = "> "; $sport_extra .= ""; - $sport_extra .= " $sport_ret"; + $sport_extra .= " $sport_ret"; $sport_extra .= ""; } @@ -558,44 +558,44 @@ foreach my $line (@conntrack) { $dserv_ret = uc(getservbyport($dport_ret, lc($l4proto))); } - $dport_extra = "> "; + $dport_extra = "> "; $dport_extra .= ""; - $dport_extra .= " $dport_ret"; + $dport_extra .= " $dport_ret"; $dport_extra .= ""; } print < - - + - - - - - - + + END } diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi index 5f051d21f..b66fa467b 100644 --- a/html/cgi-bin/dnsforward.cgi +++ b/html/cgi-bin/dnsforward.cgi @@ -207,20 +207,20 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) { print < - + - +
+ + - - + + +          - - + + - - + + +        - - + + - - + + +      - - + + - - + + + - - + + +
+
$Lang::tr{'protocol'} + $Lang::tr{'source ip and port'} + $Lang::tr{'dest ip and port'} + $Lang::tr{'download'} /
$Lang::tr{'upload'}
+ $Lang::tr{'connection'}
$Lang::tr{'status'}
+ $Lang::tr{'expires'}
($Lang::tr{'seconds'})
$l4proto + $l4proto - $sip + $sip $sip_extra + - $sport + $sport $sport_extra + - $dip + $dip $dip_extra + - $dport + $dport $dport_extra + $bytes_in / $bytes_out $state$ttl$state$ttl
$Lang::tr{'dnsforward zone'}:$Lang::tr{'dnsforward zone'}: $Lang::tr{'enabled'}
$Lang::tr{'dnsforward forward_server'}:$Lang::tr{'dnsforward forward_server'}:
- +
$Lang::tr{'remark'}: *$Lang::tr{'remark'}: *
@@ -229,7 +229,7 @@ print <
* $Lang::tr{'this field may be blank'}* $Lang::tr{'this field may be blank'} diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index ca98e7211..c5ccae809 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2012 IPFire Team # +# Copyright (C) 2007-2014 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -158,6 +158,11 @@ if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( close IPADDR; chomp ($ipaddr); } + if (open(IPADDR,"${General::swroot}/red/local-ipaddress")) { + $ipaddr = ; + close IPADDR; + chomp ($ipaddr); + } } elsif ($modemsettings{'VALID'} eq 'no') { print "$Lang::tr{'modem settings have errors'}\n \n"; } else { @@ -166,18 +171,22 @@ if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( print < - - - - - - - +
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$Lang::tr{'internet'}
$ipaddr $connstate
+ + + + + + + + + + END my $HOSTNAME = (gethostbyaddr(pack("C4", split(/\./, $ipaddr)), 2))[0]; if ( "$HOSTNAME" ne "" ) { print < + END } @@ -187,7 +196,7 @@ END chomp($GATEWAY); close TMP; print < + END } @@ -209,99 +218,131 @@ END - - +
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$Lang::tr{'internet'}
$ipaddr $connstate
$Lang::tr{'hostname'}:$HOSTNAME
$Lang::tr{'hostname'}:$HOSTNAME$Lang::tr{'gateway'}:$GATEWAY
$Lang::tr{'gateway'}:$GATEWAY
$Lang::tr{'dns servers'}: + $dns_servers_str
END #Dial profiles if ( $netsettings{'RED_TYPE'} ne "STATIC" && $netsettings{'RED_TYPE'} ne "DHCP" ){ -print `/usr/local/bin/dialctrl.pl show`; -print < - + # The dialctrl.pl script outputs html + print `/usr/local/bin/dialctrl.pl show`; + if ( ( $pppsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) ) { + print < +
+ + +
$Lang::tr{'profile'}: - - - - -
- -
-
- -
-
+ + + +
+ + + + + +
+
+ +
+
+
+ +
+
+
END } else { - print "$Lang::tr{'profile has errors'}\n \n"; + print "
$Lang::tr{'profile has errors'}
"; } - print"
"; } - if ( $netsettings{'GREEN_DEV'} ) { + + +print < + + + + + + +END + +if ( $netsettings{'GREEN_DEV'} ) { my $sub=&General::iporsubtocidr($netsettings{'GREEN_NETMASK'}); print < -
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
- - - - - + + '; + print ''; } - if ( $netsettings{'BLUE_DEV'} ) { +if ( $netsettings{'BLUE_DEV'} ) { my $sub=&General::iporsubtocidr($netsettings{'BLUE_NETMASK'}); print < + + '; + print ''; } - if ( $netsettings{'ORANGE_DEV'} ) { +if ( $netsettings{'ORANGE_DEV'} ) { my $sub=&General::iporsubtocidr($netsettings{'ORANGE_NETMASK'}); print < + + + + END } #check if IPSEC is running if ( $vpnsettings{'ENABLED'} eq 'on' || $vpnsettings{'ENABLED_BLUE'} eq 'on' ) { my $ipsecip = $vpnsettings{'VPN_IP'}; print< + + + + END } @@ -317,14 +358,15 @@ if (($confighash{'ENABLED'} eq "on") || $ovpnip="$ovpnip/$sub"; print < - - + + END } -print"
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$Lang::tr{'lan'} - $netsettings{'GREEN_ADDRESS'}/$sub - + + $Lang::tr{'lan'} + $netsettings{'GREEN_ADDRESS'}/$sub END if ( $proxysettings{'ENABLE'} eq 'on' ) { print $Lang::tr{'advproxy on'}; if ( $proxysettings{'TRANSPARENT'} eq 'on' ) { print " (transparent)"; } } else { print $Lang::tr{'advproxy off'}; } + print '
$Lang::tr{'wireless'}
-
$netsettings{'BLUE_ADDRESS'}/$sub - +
+ $Lang::tr{'wireless'} + $netsettings{'BLUE_ADDRESS'}/$sub + END if ( $proxysettings{'ENABLE_BLUE'} eq 'on' ) { print $Lang::tr{'advproxy on'}; if ( $proxysettings{'TRANSPARENT_BLUE'} eq 'on' ) { print " (transparent)"; } } else { print $Lang::tr{'advproxy off'}; } + print '
$Lang::tr{'dmz'}
-
$netsettings{'ORANGE_ADDRESS'}/$sub - Online +
+ $Lang::tr{'dmz'} + $netsettings{'ORANGE_ADDRESS'}/$subOnline
$Lang::tr{'ipsec'}
-
$ipsecip - Online +
+ $Lang::tr{'ipsec'} + $ipsecipOnline
- OpenVPN
+
+ OpenVPN $ovpnip - Online + $ovpnipOnline
"; +print""; &Header::closebox(); #Check if there are any vpns configured (ipsec and openvpn) @@ -348,7 +390,8 @@ foreach my $dkey (sort { ncmp($ovpnconfig{$a}[1],$ovpnconfig{$b}[1])} keys %ovpn if ($showbox){ # Start of Box wich contains all vpn connections &Header::openbox('100%', 'center', $Lang::tr{'vpn'}); -#show ipsec connectiontable + + #show ipsec connectiontable if ( $showipsec ) { my $ipsecip = $vpnsettings{'VPN_IP'}; my @status = `/usr/local/bin/ipsecctrl I`; @@ -358,12 +401,11 @@ if ($showbox){ my $col=""; my $count=0; print < - +
- - - + + + END foreach my $key (sort { uc($vpnconfig{$a}[1]) cmp uc($vpnconfig{$b}[1]) } keys %vpnconfig) { @@ -373,43 +415,43 @@ END $vpnsub=&General::iporsubtocidr($vpnsub); $vpnip="$vpnip/$vpnsub"; if ($count % 2){ - $col="bgcolor='$color{'color22'}'"; + $col = $color{'color22'}; }else{ - $col="bgcolor='$color{'color20'}'"; - } - if ($id % 2) { - print ""; - } else { - print ""; + $col = $color{'color20'}; } - my $active = ""; + print ""; + print ""; + print ""; + + my $activecolor = $Header::colourred; + my $activestatus = $Lang::tr{'capsclosed'}; if ($vpnconfig{$key}[0] eq 'off') { - $active = ""; + $activecolor = $Header::colourblue; + $activestatus = $Lang::tr{'capsclosed'}; } else { foreach my $line (@status) { if (($line =~ /\"$vpnconfig{$key}[1]\".*IPsec SA established/) || ($line =~/$vpnconfig{$key}[1]\{.*INSTALLED/ )){ - $active = ""; + $activecolor = $Header::colourgreen; + $activestatus = $Lang::tr{'capsopen'}; } } } - print "$active"; + print ""; + print ""; } } - print "
$Lang::tr{'ipsec network'}$Lang::tr{'ip address'}$Lang::tr{'status'}$Lang::tr{'ipsec network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$vpnconfig{$key}[1]$vpnip
$vpnconfig{$key}[1]$vpnip$Lang::tr{'capsclosed'}
$vpnconfig{$key}[1]$vpnip$Lang::tr{'capsclosed'}$Lang::tr{'capsopen'}$activestatus
"; + print ""; } -### -# Check if there is any OpenVPN connection configured. -### - + # Check if there is any OpenVPN connection configured. if ( $showovpn ){ print < - +
+
- - - + + + END # Check if the OpenVPN server for Road Warrior Connections is running and display status information. @@ -436,9 +478,9 @@ END $display = $tustate[1]; } if ($count %2){ - $col="bgcolor='$color{'color22'}'"; + $col = $color{'color22'}; }else{ - $col="bgcolor='$color{'color20'}'"; + $col = $color{'color20'}; } $active='off'; #make cidr from ip @@ -447,16 +489,16 @@ END my $vpnip="$vpnip/$vpnsub"; print < - - - + + + END } } } if ($active ne 'off'){ - print ""; + print ""; } print"
$Lang::tr{'openvpn network'}$Lang::tr{'ip address'}$Lang::tr{'status'}$Lang::tr{'openvpn network'}$Lang::tr{'ip address'}$Lang::tr{'status'}$ovpnconfig{$dkey}[1]$vpnip$display$ovpnconfig{$dkey}[1]$vpnip$display
$Lang::tr{'ovpn no connections'}
$Lang::tr{'ovpn no connections'}
"; } @@ -476,7 +518,7 @@ $free[2] =~ m/(\d+)/; my $used = $1; my $pct = int 100 * ($mem - $used) / $mem; if ($used / $mem > 90) { - $warnmessage .= "
  • $Lang::tr{'high memory usage'}: $pct% !
  • \n"; + $warnmessage .= "
  • $Lang::tr{'high memory usage'}: $pct% !
  • "; } # Diskspace usage warning @@ -491,7 +533,7 @@ foreach my $line (@df) { if ($1<5) { # available:plain value in MB, and not %used as 10% is too much to waste on small disk # and root size should not vary during time - $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$1M !
  • \n"; + $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$1M !
  • "; } } else { @@ -500,7 +542,7 @@ foreach my $line (@df) { if ($1>90) { @temp = split(/ /,$line); $temp2=int(100-$1); - $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$temp2% !
  • \n"; + $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$temp2% !
  • "; } } } @@ -512,7 +554,7 @@ foreach my $file (@files) { my $disk=`echo $file | cut -d"-" -f2`; chomp ($disk); if (`/bin/grep "SAVE ALL DATA" $file`) { - $warnmessage .= "
  • $Lang::tr{'smartwarn1'} /dev/$disk $Lang::tr{'smartwarn2'} !
  • \n\n"; + $warnmessage .= "
  • $Lang::tr{'smartwarn1'} /dev/$disk $Lang::tr{'smartwarn2'} !
  • "; } } @@ -520,24 +562,25 @@ foreach my $file (@files) { my @files = `mount | grep " reiser4 (" 2>/dev/null`; foreach my $disk (@files) { chomp ($disk); - $warnmessage .= "
  • $disk - $Lang::tr{'deprecated fs warn'}
  • \n\n"; + $warnmessage .= "
  • $disk - $Lang::tr{'deprecated fs warn'}
  • "; } if ($warnmessage) { &Header::openbox('100%','center', ); - print ""; + print "
    "; print ""; - print "
    $Lang::tr{'fwhost hint'}
    $warnmessage
    "; + print "$warnmessage"; + print ""; &Header::closebox(); } -print "
    "; &Pakfire::dblist("upgrade", "notice"); if ( -e "/var/run/need_reboot" ) { - print "

    $Lang::tr{'needreboot'}!"; + print "
    "; + print "

    $Lang::tr{'needreboot'}!"; + print "
    "; } -print "
    "; - &Header::closebigbox(); &Header::closepage(); + diff --git a/html/cgi-bin/logs.cgi/firewalllogip.dat b/html/cgi-bin/logs.cgi/firewalllogip.dat index f671ab855..e4e845198 100644 --- a/html/cgi-bin/logs.cgi/firewalllogip.dat +++ b/html/cgi-bin/logs.cgi/firewalllogip.dat @@ -427,16 +427,12 @@ for($s=0;$s<$lines;$s++) $percent = $value[$s] * 100 / $linesjc; $percent = sprintf("%.f", $percent); $total = $total + $value[$s]; - if ( ($color % 10) == 1 ){print ""; $col="bcolor='$color{'color1'}'";} - if ( ($color % 10) == 2 ){print ""; $col="bcolor='$color{'color2'}'";} - if ( ($color % 10) == 3 ){print ""; $col="bcolor='$color{'color3'}'";} - if ( ($color % 10) == 4 ){print ""; $col="bcolor='$color{'color4'}'";} - if ( ($color % 10) == 5 ){print ""; $col="bcolor='$color{'color5'}'";} - if ( ($color % 10) == 6 ){print ""; $col="bcolor='$color{'color6'}'";} - if ( ($color % 10) == 7 ){print ""; $col="bcolor='$color{'color7'}'";} - if ( ($color % 10) == 8 ){print ""; $col="bcolor='$color{'color8'}'";} - if ( ($color % 10) == 9 ){print ""; $col="bcolor='$color{'color9'}'";} - if ( ($color % 10) == 0 ){print ""; $col="bcolor='$color{'color10'}'";} + my $colorIndex = $color % 10; + if($colorIndex == 0) { + $colorIndex = 10; + } + $col="bgcolor='$color{\"color$colorIndex\"}'"; + print ""; my $gi = Geo::IP::PurePerl->new(); my $ccode = $gi->country_code_by_name($key[$s]); @@ -456,16 +452,12 @@ for($s=0;$s<$lines;$s++) if($cgiparams{'otherspie'} == 2 ){} else{ -if ( ($color % 10) == 1 ){print ""; $col="bcolor='$color{'color1'}'";} -if ( ($color % 10) == 2 ){print ""; $col="bcolor='$color{'color2'}'";} -if ( ($color % 10) == 3 ){print ""; $col="bcolor='$color{'color3'}'";} -if ( ($color % 10) == 4 ){print ""; $col="bcolor='$color{'color4'}'";} -if ( ($color % 10) == 5 ){print ""; $col="bcolor='$color{'color5'}'";} -if ( ($color % 10) == 6 ){print ""; $col="bcolor='$color{'color6'}'";} -if ( ($color % 10) == 7 ){print ""; $col="bcolor='$color{'color7'}'";} -if ( ($color % 10) == 8 ){print ""; $col="bcolor='$color{'color8'}'";} -if ( ($color % 10) == 9 ){print ""; $col="bcolor='$color{'color9'}'";} -if ( ($color % 10) == 0 ){print ""; $col="bcolor='$color{'color10'}'";} + my $colorIndex = $color % 10; + if($colorIndex == 0) { + $colorIndex = 10; + } + $col="bgcolor='$color{\"color$colorIndex\"}'"; + print ""; if ( $linesjc ne "0") { @@ -504,7 +496,10 @@ sub findkey { last; } } -}sub checkversion { - #Automatic Updates is disabled - return "0","0"; - } +} + +sub checkversion { + #Automatic Updates is disabled + return "0","0"; +} + diff --git a/html/cgi-bin/logs.cgi/firewalllogport.dat b/html/cgi-bin/logs.cgi/firewalllogport.dat index ba106016f..9f7ce3a11 100644 --- a/html/cgi-bin/logs.cgi/firewalllogport.dat +++ b/html/cgi-bin/logs.cgi/firewalllogport.dat @@ -429,16 +429,12 @@ for($s=0;$s<$lines;$s++) $percent = $value[$s] * 100 / $linesjc; $percent = sprintf("%.f", $percent); $total = $total + $value[$s]; - if ( ($color % 10) == 1 ){print ""; $col="bgcolor='$color{'color1'}'";} - if ( ($color % 10) == 2 ){print ""; $col="bgcolor='$color{'color2'}'";} - if ( ($color % 10) == 3 ){print ""; $col="bgcolor='$color{'color3'}'";} - if ( ($color % 10) == 4 ){print ""; $col="bgcolor='$color{'color4'}'";} - if ( ($color % 10) == 5 ){print ""; $col="bgcolor='$color{'color5'}'";} - if ( ($color % 10) == 6 ){print ""; $col="bgcolor='$color{'color6'}'";} - if ( ($color % 10) == 7 ){print ""; $col="bgcolor='$color{'color7'}'";} - if ( ($color % 10) == 8 ){print ""; $col="bgcolor='$color{'color8'}'";} - if ( ($color % 10) == 9 ){print ""; $col="bgcolor='$color{'color9'}'";} - if ( ($color % 10) == 0 ){print ""; $col="bgcolor='$color{'color10'}'";} + my $colorIndex = $color % 10; + if($colorIndex == 0) { + $colorIndex = 10; + } + $col="bgcolor='$color{\"color$colorIndex\"}'"; + print ""; $color++; print "
    "; @@ -450,16 +446,12 @@ for($s=0;$s<$lines;$s++) if($cgiparams{'otherspie'} == 2 ){} else{ -if ( ($color % 10) == 1 ){print ""; $col="bgcolor='$color{'color1'}'";} -if ( ($color % 10) == 2 ){print ""; $col="bgcolor='$color{'color2'}'";} -if ( ($color % 10) == 3 ){print ""; $col="bgcolor='$color{'color3'}'";} -if ( ($color % 10) == 4 ){print ""; $col="bgcolor='$color{'color4'}'";} -if ( ($color % 10) == 5 ){print ""; $col="bgcolor='$color{'color5'}'";} -if ( ($color % 10) == 6 ){print ""; $col="bgcolor='$color{'color6'}'";} -if ( ($color % 10) == 7 ){print ""; $col="bgcolor='$color{'color7'}'";} -if ( ($color % 10) == 8 ){print ""; $col="bgcolor='$color{'color8'}'";} -if ( ($color % 10) == 9 ){print ""; $col="bgcolor='$color{'color9'}'";} -if ( ($color % 10) == 0 ){print ""; $col="bgcolor='$color{'color10'}'";} + my $colorIndex = $color % 10; + if($colorIndex == 0) { + $colorIndex = 10; + } + $col="bgcolor='$color{\"color$colorIndex\"}'"; + print ""; if ( $linesjc ne "0") { @@ -487,6 +479,7 @@ END &Header::closepage(); sub findkey { + my $v; foreach $v (@keytabjc) { if ($tabjc{$v} eq $_[0]) { delete $tabjc{$v}; @@ -497,7 +490,9 @@ sub findkey { } } } + sub checkversion { - #Automatic Updates is disabled - return "0","0"; - } + #Automatic Updates is disabled + return "0","0"; +} + diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi index 7e8e32eea..2aec3cce1 100644 --- a/html/cgi-bin/media.cgi +++ b/html/cgi-bin/media.cgi @@ -206,9 +206,9 @@ sub diskbox { if ( $status[1]=~/standby/){ my $ftime = localtime((stat("/var/run/hddshutdown-$disk"))[9]); - print"Disk $disk status:".$status[1]." ($Lang::tr{'since'} $ftime)"; + print"Disk $disk status:".$status[1]." ($Lang::tr{'since'} $ftime)"; }else{ - print"Disk $disk status:".$status[1].""; + print"Disk $disk status:".$status[1].""; } } diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index f3539cd9b..dee6f41bd 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -772,10 +772,10 @@ if ( ($qossettings{'DEFCLASS_INC'} eq '') || ($qossettings{'DEFCLASS_OUT'} eq '' exit } - &Header::openbox('100%', 'center', "$qossettings{'RED_DEV'} $Lang::tr{'graph'}"); + &Header::openbox('100%', 'center', "$qossettings{'RED_DEV'} $Lang::tr{'graph'}, $Lang::tr{'uplink'}"); &Graphs::makegraphbox("qos.cgi",$qossettings{'RED_DEV'},"hour","325"); &Header::closebox(); - &Header::openbox('100%', 'center', "$qossettings{'IMQ_DEV'} $Lang::tr{'graph'}"); + &Header::openbox('100%', 'center', "$qossettings{'IMQ_DEV'} $Lang::tr{'graph'}, $Lang::tr{'downlink'}"); &Graphs::makegraphbox("qos.cgi",$qossettings{'IMQ_DEV'},"hour","325"); &Header::closebox(); @@ -1184,7 +1184,7 @@ sub showclasses { @classline = split( /\;/, $classentry ); if ( $classline[0] eq $qossettings{'DEV'} ) { - &Header::openbox('100%', 'center', "$Lang::tr{'Class'}: $classline[1]"); + &Header::openbox('100%', 'center', "$Lang::tr{'Class'}: $classline[1] $classline[8]"); print < $Lang::tr{'interface'} diff --git a/html/cgi-bin/upnp.cgi b/html/cgi-bin/upnp.cgi index ee341e15a..07dfa2677 100644 --- a/html/cgi-bin/upnp.cgi +++ b/html/cgi-bin/upnp.cgi @@ -133,7 +133,7 @@ print < END ; -if ( $message ne "" ) {print "$message";} +if ( $message ne "" ) {print "$message";} my $lines = 0; my $key = ''; @@ -199,9 +199,9 @@ print ""; ############################################################################################################################ sub isrunning - { +{ my $cmd = $_[0]; - my $status = "$Lang::tr{'stopped'}"; + my $status = "$Lang::tr{'stopped'}"; my $pid = ''; my $testcmd = ''; my $exename; @@ -219,9 +219,10 @@ sub isrunning {if (/^Name:\W+(.*)/) {$testcmd = $1; }} close FILE; if ($testcmd =~ /$exename/) - {$status = "$Lang::tr{'running'}";} + {$status = "$Lang::tr{'running'}";} } } return $status; - } +} + diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index f354a45bf..86b1b75ba 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -129,7 +129,7 @@ print < -