summaryrefslogtreecommitdiffstats
path: root/lib/network/connection/ethernet.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-05 21:33:39 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-05 21:33:39 +0000
commit455cc281d5e7640d47cdb8df783eb93513a9e088 (patch)
treefd555893333133e270648d5a2cd59aa73d11464d /lib/network/connection/ethernet.pm
parent3c050178362e67c4458f7048306d16706447c0b2 (diff)
downloaddrakx-net-455cc281d5e7640d47cdb8df783eb93513a9e088.tar
drakx-net-455cc281d5e7640d47cdb8df783eb93513a9e088.tar.gz
drakx-net-455cc281d5e7640d47cdb8df783eb93513a9e088.tar.bz2
drakx-net-455cc281d5e7640d47cdb8df783eb93513a9e088.tar.xz
drakx-net-455cc281d5e7640d47cdb8df783eb93513a9e088.zip
prefer real interfaces over virtual/vlan
Diffstat (limited to 'lib/network/connection/ethernet.pm')
-rw-r--r--lib/network/connection/ethernet.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm
index f0ef857..c676688 100644
--- a/lib/network/connection/ethernet.pm
+++ b/lib/network/connection/ethernet.pm
@@ -364,10 +364,11 @@ sub device_matches_interface {
sub device_to_interface {
my ($device) = @_;
my @all_interfaces = detect_devices::get_net_interfaces();
+ my ($real, $other) = partition { network::tools::is_real_interface($_) } @all_interfaces;
find {
device_matches_interface_HwIDs($device, $_) ||
device_matches_interface($device, $_);
- } @all_interfaces;
+ } @$real, @$other;
}
sub interface_to_device {