This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FW: Ppp echo request problem


We have had a problem with the ppp echo requests, when the ppp
connection has been running for a long period of time.  If the ppp peer
connection is re-negotiated, then the lcp layer can start sending extra
echo requests. The number of requests sent increases each time the
connection is re-negotiated, eventually causing the connection to
terminate automatically after one minute.

The problem seems to be in lcp.c, function LcpEchoCheck. The link can be
terminated during the call to LcpSendEchoRequest if the peer is not
responding and this will result in the timeout being created for the
link which is now closed. When the ppp is re-negotiated, the extra
timeout still persists and causing the problems described above.

Has anyone had this problem?

Suggested fix would be to only call TIMEOUT if the ppp link is still
open - see below:-

static void
LcpEchoCheck (f)
    fsm *f;
{
    LcpSendEchoRequest (f);

    /*
     * Start the timer for the next interval, provided that the
     * link is still in the "OPENED" state.
     */
    assert (lcp_echo_timer_running==0);
    if (f->state == OPENED) {
        TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
        lcp_echo_timer_running = 1;
    }
}


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]