Technical article 110485

Morning Star PPP - My default route doesn't get properly updated after establishing an outbound PPP session using dynamic IP addresses.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

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" ]; then
if [ -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 address
if [ "$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
fi
else
# 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
    fi
fi
if [ -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."

From the Xinuos technical article database, record 110485. Reproduced with permission. The original is at www.sco.com/ta/110485, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.