diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/IFCFG.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/IFCFG.pm b/common/IFCFG.pm index 39ab0fb4..badd586c 100644 --- a/common/IFCFG.pm +++ b/common/IFCFG.pm @@ -70,7 +70,7 @@ sub new { $_ = `/sbin/ip -4 address show dev $device |grep inet`; my ($ip, $netmask, $bcast,) = /inet\s([0-9\.]*)\/([0-9]*)\sbrd\s([0-9\.]*)/; if (defined $ip && defined $bcast && defined $netmask) { - $self->{itf}{$device} = { IPADDR => $ip, BROADCAST => $bcast, NETMASK => $netmask }; + $self->{itf}{$device} = { IPADDR => $ip, BROADCAST => $bcast, NETMASK => @network_masks[$netmask - 1] }; my %conf = getVarsFromSh("/etc/sysconfig/network-scripts/ifcfg-$device"); $self->{itf}{$device}{$_} = $conf{$_} foreach 'BOOTPROTO'; } |