From 455cc281d5e7640d47cdb8df783eb93513a9e088 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 5 Mar 2008 21:33:39 +0000 Subject: prefer real interfaces over virtual/vlan --- lib/network/connection/ethernet.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/network/connection/ethernet.pm') 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 { -- cgit v1.2.1