Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into beyond-next

This commit is contained in:
Michael Tremer
2014-03-26 23:42:57 +01:00
10 changed files with 386 additions and 302 deletions

0
html/cgi-bin/entropy.cgi Executable file → Normal file
View File

View File

@@ -584,8 +584,10 @@ sub checktarget
}
}
}else{
$errormessage=$Lang::tr{'fwdfw dnat error'}."<br>";
return $errormessage;
if ($fwdfwsettings{'grp2'} ne 'ipfire'){
$errormessage=$Lang::tr{'fwdfw dnat error'}."<br>";
return $errormessage;
}
}
}
if ($fwdfwsettings{'tgt_addr'} eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $fwdfwsettings{'tgt_addr'} ne ''){
@@ -989,6 +991,12 @@ sub deleterule
&base;
}
}
sub del_double
{
my %all=();
@all{@_}=1;
return (keys %all);
}
sub disable_rule
{
my $key1=shift;
@@ -2551,9 +2559,21 @@ END
<td align='center' $tdcolor>
END
#Is this a DNAT rule?
my $natstring;
if ($$hash{$key}[31] eq 'dnat' && $$hash{$key}[28] eq 'ON'){
if ($$hash{$key}[29] eq 'Default IP'){$$hash{$key}[29]=$Lang::tr{'red1'};}
print "Firewall ($$hash{$key}[29])";
if ($$hash{$key}[29] eq 'AUTO'){
my @src_addresses=&fwlib::get_addresses(\%$hash,$key,'src');
my @nat_ifaces;
foreach my $val (@src_addresses){
push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$val));
}
@nat_ifaces=&del_double(@nat_ifaces);
$natstring = join(', ', @nat_ifaces);
}else{
$natstring = $$hash{$key}[29];
}
print "$Lang::tr{'firewall'} ($natstring)";
if($$hash{$key}[30] ne ''){
$$hash{$key}[30]=~ tr/|/,/;
print": $$hash{$key}[30]";

View File

@@ -265,7 +265,7 @@ if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){
my $wiphy = `iw dev $wlanapsettings{'INTERFACE'} info | grep wiphy | cut -d" " -f2`;
chomp $wiphy;
@channellist_cmd = `iw phy phy$wiphy info | grep " MHz \\\[" | grep -v "(disabled)" | grep -v "no IBSS)" 2>/dev/null`;
@channellist_cmd = `iw phy phy$wiphy info | grep " MHz \\\[" | grep -v "(disabled)" | grep -v "no IBSS" | grep -v "passive scanning" 2>/dev/null`;
# get available channels
my @temp;
@@ -512,7 +512,7 @@ if ( $wlanapsettings{'DRIVER'} eq 'MADWIFI' ){
@status = `wlanconfig $wlanapsettings{'INTERFACE'} list`;
}
if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){
@status = `iw dev $wlanapsettings{'INTERFACE'} info && iw dev $wlanapsettings{'INTERFACE'} station dump`;
@status = `iw dev $wlanapsettings{'INTERFACE'} info && iw dev $wlanapsettings{'INTERFACE'} station dump && echo ""`;
}
print <<END
<br />