diff options
Diffstat (limited to 'sysconfig/network-scripts/ifup-ippp')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ippp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp index 7cfe6f39..6ab69117 100755 --- a/sysconfig/network-scripts/ifup-ippp +++ b/sysconfig/network-scripts/ifup-ippp @@ -335,11 +335,14 @@ function addprovider() [ "$DEBUG" = "yes" ] && options="-d $options" # set netmask, if available - [ -n "$NETMASK" ] && netmask="netmask $NETMASK" - + [ -n "$NETMASK" ] && { + val=$(ipcalc --prefix $IPADDR $NETMASK) + pfx=${val##PREFIX=} + } # activate ISDN device - /usr/bin/logger -p daemon.info -t ifup-ippp "ifconfig $DEVICE $IPADDR pointopoint $GATEWAY $netmask up" - ifconfig $DEVICE $IPADDR pointopoint $GATEWAY $netmask up >/dev/null 2>&1 + /usr/bin/logger -p daemon.info -t ifup-ippp "ip addr add $IPADDR peer $GATEWAY${pfx:/$pfx} dev $DEVICE" + ip addr add $IPADDR peer $GATEWAY${pfx:/$pfx} dev $DEVICE + ip link set dev $DEVICE up if [ "$ENCAP" = "syncppp" ]; then # start ipppd daemon |