summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-05 22:12:00 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-05 22:12:00 +0000
commit75dc3515e3bee1f917392969e7cf8be27dfda83f (patch)
tree3975704777097113c7815b4a273b8bf4f88b52d4 /lib
parent0f999262c29dbc1a7799fb474f5222a074b2ee0c (diff)
downloaddrakx-net-75dc3515e3bee1f917392969e7cf8be27dfda83f.tar
drakx-net-75dc3515e3bee1f917392969e7cf8be27dfda83f.tar.gz
drakx-net-75dc3515e3bee1f917392969e7cf8be27dfda83f.tar.bz2
drakx-net-75dc3515e3bee1f917392969e7cf8be27dfda83f.tar.xz
drakx-net-75dc3515e3bee1f917392969e7cf8be27dfda83f.zip
show only non-zeroconf virtual interfaces
Diffstat (limited to 'lib')
-rwxr-xr-xlib/network/netcenter.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm
index 2423b35..6c53114 100755
--- a/lib/network/netcenter.pm
+++ b/lib/network/netcenter.pm
@@ -10,6 +10,7 @@ use mygtk2;
use ugtk2 qw(:create :helpers :wrappers);
use network::connection;
use network::connection_manager;
+use network::tools;
sub build_cmanager {
my ($in, $net, $w, $pixbufs, $connection) = @_;
@@ -41,9 +42,12 @@ sub main {
my $wait = $in->wait_message(N("Please wait"), N("Please wait"));
my @all_connections = map { $_->get_connections(automatic_only => 1, fast_only => 1) } network::connection::get_types;
+ @all_connections = grep { !network::tools::is_zeroconf_interface($_->get_interface) } @all_connections;
my ($sysfs, $no_sysfs) = partition { exists $_->{device}{sysfs_device} } @all_connections;
+ my ($real, $other) = partition { network::tools::is_real_interface($_->get_interface) } @$sysfs;
my @connections = (
- (uniq_ { $_->{device}{sysfs_device} } @$sysfs),
+ (uniq_ { $_->{device}{sysfs_device} } @$real),
+ (uniq_ { $_->{device}{sysfs_device} } @$other),
(uniq_ { $_->{device}{interface} } @$no_sysfs),
);