diff options
Diffstat (limited to 'lib/network')
-rw-r--r-- | lib/network/tools.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/network/tools.pm b/lib/network/tools.pm index b62d876..882060e 100644 --- a/lib/network/tools.pm +++ b/lib/network/tools.pm @@ -229,7 +229,7 @@ sub get_default_metric { sub get_interface_ip_address { my ($net, $interface) = @_; - `/sbin/ip addr show dev $interface` =~ /^\s*inet\s+([\d.]+)/m && $1 || + `/sbin/ip addr show dev $interface` =~ /^\s*inet\s+([\d.]+).*\s+$interface$/m && $1 || $net->{ifcfg}{$interface}{IPADDR}; } |