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). --- ---
to maintainer
Still fails in the same way with ppp-2.4.1.20031003-alt2 from Sisyphus.
В 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.
зацикливаниие сигналов я победил. c holdoff всё хуже. значение holdoff принудительно сбрасывается в 0 уже после разбора опций из-за ошибки в коде. Я могу поставить хак, который будет спасать holdoff. Подозреваю, что там спрятано ещё много таких же граблей. Для нормального исправления этой ошибки потребуется изменение значительного куска кода pppd. Влезать в это очень не хочется.
fixed in ppp-2.4.2-alt2