Skip interfaces with no name

This commit is contained in:
Jamie Cameron
2009-12-08 15:09:00 -08:00
parent 055851036c
commit 09ec34dadf

View File

@@ -102,9 +102,10 @@ if (($missingrule || !$sysconf) && $access{'setup'}) {
print &ui_form_start("setup.cgi");
print "<b>$text{'index_iface'}</b>\n";
foreach $i (&net::active_interfaces(), &net::boot_interfaces()) {
push(@ifaces, $i->{'fullname'}) if ($i->{'virtual'} eq '');
push(@ifaces, $i->{'fullname'}) if ($i->{'virtual'} eq '' &&
$i->{'fullname'});
}
print &ui_select("iface", $config{'iface'},
print &ui_select("iface", $config{'iface'} || $ifaces[0],
[ (map { [ $_, $_ ] } &unique(@ifaces)),
[ '', $text{'index_other'} ] ],
1, 0, $config{'iface'} ? 1 : 0)." ".