From 09ec34dadfeff45d7350df1cbb7f13f15349731e Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 8 Dec 2009 15:09:00 -0800 Subject: [PATCH] Skip interfaces with no name --- bandwidth/index.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bandwidth/index.cgi b/bandwidth/index.cgi index 3769d3d8b..5d97a9ca8 100755 --- a/bandwidth/index.cgi +++ b/bandwidth/index.cgi @@ -102,9 +102,10 @@ if (($missingrule || !$sysconf) && $access{'setup'}) { print &ui_form_start("setup.cgi"); print "$text{'index_iface'}\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)." ".