From 05cabd5cf7ac460072a1a60855db0dd231410c22 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 17 Nov 2008 11:21:10 +0000 Subject: remember ethernet interface, it is not likely to change, and it is useful to keep it to match objects with interfaces on device removal events --- lib/network/connection/ethernet.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 31e98cc..e0fef99 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -50,7 +50,7 @@ sub get_metric { sub get_interface { my ($self) = @_; - $self->{device}{interface} || device_to_interface($self->{device}); + $self->{device}{interface} ||= device_to_interface($self->{device}); } sub check_device { -- cgit v1.2.1