aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig')
-rw-r--r--sysconfig/network-scripts/network-functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 6224f0c9..5815eaa9 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -168,6 +168,11 @@ expand_config ()
netmask[$i]=$(eval echo '$'NETMASK$idx)
broadcast[$i]=$(eval echo '$'BROADCAST$idx)
+ if [ "${prefix[$i]}x" != "x" ]; then
+ val=$(/bin/ipcalc --netmask "${ipaddr[$i]}/${prefix[$i]}")
+ netmask[$i]=${val##NETMASK=}
+ fi
+
if [ "${netmask[$i]}x" = "x" ]; then
val=$(/bin/ipcalc --netmask "${ipaddr[$i]}")
netmask[$i]=${val##NETMASK=}