Bug 1589 - holdoff option does not work
: holdoff option does not work
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/ppp)
: unstable
: all Linux
: P5 major
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-11-20 15:21 by
Modified: 2005-07-13 15:45 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2002-11-20 15:21:19
The pppd holdoff option does not seem to work in some cases:
- when pppd gets no answer to LCP ConfReq;
- when the pty command exits.

In both cases pppd (with the persist option) attempts to reconnect immediately, without waiting for the specified holdoff time.

Examples:

# pppd /dev/ttyS0 debug nodetach local persist holdoff 120
 (there is nothing connected to /dev/ttyS0)
using channel 14
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa325eb19> <pcomp> <accomp>]
LCP: timeout sending Config-Requests
Connection terminated.
 (there should be a pause for 120 seconds here - but there is none)
using channel 15
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xccf8637a> <pcomp> <accomp>]

# pppd pty \'sleep 1\' debug nodetach local persist holdoff 120
using channel 16
Using interface ppp0
Connect: ppp0 <--> /dev/pts/6
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x1dad7046> <pcomp> <accomp>]
Script sleep 1 finished (pid 4365), status = 0x0
Modem hangup
Connection terminated.
 (there should be a pause for 120 seconds here - but there is none)
using channel 17
Using interface ppp0
Connect: ppp0 <--> /dev/pts/6
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x85ce85a3> <pcomp> <accomp>]
Script sleep 1 finished (pid 4376), status = 0x0

# uname -a
Linux XXXXXX 2.4.18-alt8-up #1 Thu Aug 22 20:57:21 MSD 2002 i686 unknown unknown GNU/Linux
# cat /etc/ppp/options
lock

This happens with ppp-2.4.1-alt8 (from Sisyphus) and ppp-2.4.1-alt6 (from ALT Linux Master 2.0).
---

---

------- Comment #1 From 2004-05-14 17:50:11 -------
to maintainer 
------- Comment #2 From 2004-05-14 17:57:23 -------
Still fails in the same way with ppp-2.4.1.20031003-alt2 from Sisyphus.
------- Comment #3 From 2004-06-06 18:32:41 -------
В ppp-2.4.2-alt1 стало ещё интереснее:

# pppd pty 'sleep 1' debug nodetach local persist holdoff 120
using channel 19
Using interface ppp0
Connect: ppp0 <--> /dev/pts/59
Script sleep 1 finished (pid 15721), status = 0x0
Modem hangup
Connection terminated.
using channel 20
Using interface ppp0
Connect: ppp0 <--> /dev/pts/60
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x6908bbb6> <pcomp> <accomp>]
Script sleep 1 finished (pid 15736), status = 0x0
Modem hangup
Connection terminated.
using channel 21
Using interface ppp0
Connect: ppp0 <--> /dev/pts/61
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xb91b8ca6> <pcomp> <accomp>]
...

Зедержки нет, как и раньше, но теперь при нажатии ^C выдаётся громадное
количество сообщений "Terminating on signal 2.", и в конечном итоге Segmentation
fault.
------- Comment #4 From 2004-06-08 16:20:10 -------
зацикливаниие сигналов я победил.

c holdoff всё хуже. значение holdoff принудительно сбрасывается в 0 уже после
разбора опций из-за ошибки в коде. Я могу поставить хак, который будет спасать
holdoff. Подозреваю, что там спрятано ещё много таких же граблей. Для
нормального исправления этой ошибки потребуется изменение значительного куска
кода pppd. Влезать в это очень не хочется.
------- Comment #5 From 2004-06-08 16:39:09 -------
fixed in ppp-2.4.2-alt2