Problem
When establishing an outbound PPP session using dynamically assigned
IP addresses, Morning Star PPP does not properly update the default
route in the routing table with the negotiated remote address. In
order to use the PPP session as the default route, it has to be
manually added. Cause
There is an error within the /usr/lib/mstppp/exec.dialout script which can cause the script to not properly add a dynamically assigned address.
Solution
This problem can be corrected by replacing the contents of /usr/lib/mstppp/exec.dialout with the following:
---------------------cut-here---------------------------------------------------
-
:
# This script is set by default to be to be the exec script for dialout
# PPP connections. It executes any scripts found in the directory
# $PPPHOME/exec.out, with the same arguments it receives. The argument
# format for exec scripts is: <up | down> <remote IP address> <pppd args>if [ "$1" = "up" ]; thenif [ -x /usr/internet/etc/siofifo ]; then
# if siofifo exists, set sio receive trigger to appropriate level.if expr match $PPP_DEVICE 'tty[0-9][0-9]*[A-Za-z]' >&- ; then tty=`echo $PPP_DEVICE | tr [A-Z] [a-z]` tty=/dev/$tty speed=`stty -a < $tty | head -1 | cut -f2 -d" "` case $speed in 115200) /usr/internet/etc/siofifo -r 1 $tty >&- 2>&- ;; 57600) /usr/internet/etc/siofifo -r 4 $tty >&- 2>&- ;; 38400) /usr/internet/etc/siofifo -r 8 $tty >&- 2>&- ;; *) /usr/internet/etc/siofifo -r 14 $tty >&- 2>&- ;; esac fi fi
# if the negotiated remote IP address differs from the one specified in the
# pppd arguments, then it was dynamically reassigned. If the default
# address was the default route for the system, then we need to
# reset the default route to the new remote IP addressif [ "$PPP_REMOTEADDR" != "$PPP_ORIG_REMOTEADDR" ]; then
gateway=`netstat -rn | grep "^default" | awk '{print $2}'`
if [ "$PPP_ORIG_REMOTEADDR" = "$gateway" ]; then
/etc/route -n delete default >&- 2>&-
/etc/route -n add default "$PPP_REMOTEADDR" >&- 2>&-
fi
fielse# set default route back to the default IP address, if necessary if [ "$PPP_REMOTEADDR" != "$PPP_ORIG_REMOTEADDR" ]; then
gateway=`netstat -rn | grep "^default" | awk '{print $2}'`
if [ "$PPP_REMOTEADDR" = "$gateway" ]; then
/etc/route -n delete default >&- 2>&-
if [ ! -f "/etc/rc2.d/S*iproute" ]; then
/etc/route -n add default "$PPP_ORIG_REMOTEADDR" >&- 2>&-
else
osavtcl -c "ObjectCreate {sco ipRoute} {{net default}}
{{gateway $PPP_ORIG_REMOTEADDR} {autoAdd true}}"
fi
fi
fifiif [ -d "$PPPHOME/exec.out" ]; then
for f in $PPPHOME/exec.out/*; do
if [ -x "${f}" ]; then
${f} $@
else
/bin/sh ${f} $@
fi
done
fi-----------------------------cut-here------------------------------Using this modified exec.dialout, any new outbound PPP sessions should have the correct default route entries added to the routing table.
This problem has been reported to SCO Engineering and is scheduled to be corrected in the 2.1.4 release of Morning Star PPP.
See also
ta105516, "Configure Morning Star PPP to use a connection as a default route using the Internet Manager."