summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-05 22:11:08 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-05 22:11:08 +0000
commit6ba8e8b249dabf6bd00c814cafeec172532fc992 (patch)
tree52297cd9709176ea94543305273ec9f5af0cc36f /lib/network
parent47009f00e3da42d8b62f8440a348d246e77376d0 (diff)
downloaddrakx-net-6ba8e8b249dabf6bd00c814cafeec172532fc992.tar
drakx-net-6ba8e8b249dabf6bd00c814cafeec172532fc992.tar.gz
drakx-net-6ba8e8b249dabf6bd00c814cafeec172532fc992.tar.bz2
drakx-net-6ba8e8b249dabf6bd00c814cafeec172532fc992.tar.xz
drakx-net-6ba8e8b249dabf6bd00c814cafeec172532fc992.zip
fix getting address of alias interfaces
Diffstat (limited to 'lib/network')
-rw-r--r--lib/network/tools.pm2
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};
}