linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: carlsonj@workingcode.com
To: linux-ppp@vger.kernel.org
Subject: Re: PPP Timeout
Date: Thu, 11 Nov 2004 16:09:13 +0000	[thread overview]
Message-ID: <16787.36521.406923.445599@carlson.workingcode.com> (raw)
In-Reply-To: <AB78549255EA7A4683F64803C159436D02EE4F47@stpmse02.stp.guidant.com>

Rana, Gaurav (STP) writes:
> I have a question about the PPPD timeout.
> 
> I am using PPPD 2.4.2 on Linux (embedded system)
> 
> I successfully establish a connection with a ISP, get an IP address, and then for testing purposes I plug out the modem wire. Subsequently, any application writing (I use write() ) to the pppd socket just hangs and then after 15 minutes or so write() returns with an error. Is there anyway I could reduce this timeout to 5 minutes or so?


Use alarm() or similar functions to set up your own timer.

This isn't a PPP (or pppd) issue at all.  This is a standard TCP/IP
mechanism.  Rather than failing right away, TCP/IP is intentionally
designed to retry for a while before just giving up.  That's because
links and routers and the network in general are not assumed to be
perfectly reliably, and that a link that has gone away may come back
or be replaced with an alternate path.

If you don't like that behavior for some reason, then you need to set
up your own timers and determine what you believe to be a "reasonable"
amount of time to wait for the response.  Beware; you're skating on
thin ice here: if you make the timer too short, then some users won't
be able to use your application on slow or congested networks.

-- 
James Carlson                                 <carlsonj@workingcode.com>

  reply	other threads:[~2004-11-11 16:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 16:03 PPP Timeout Rana, Gaurav (STP)
2004-11-11 16:09 ` carlsonj [this message]
2004-11-11 16:14 ` Miguel-Munoz
2004-11-11 16:16 ` Gilles Espinasse
2004-11-11 16:18 ` Rana, Gaurav (STP)
2004-11-11 19:55 ` carlsonj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16787.36521.406923.445599@carlson.workingcode.com \
    --to=carlsonj@workingcode.com \
    --cc=linux-ppp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).