wrong return code in pppd 2.4.5
I found this bug in ppp 2.4.5 (Source:ftp://ftp.samba.org/pub/ppp/ppp-2.4.5.tar.gz).
After idle the pppd should return with 12 (idle timeout) but does return with 16 (hang up). (see log below)
Is this a known problem ? Is there a patch available ?
re,
wh
/var/log/messages:
....
Feb 10 11:02:51 mws3-94700737 daemon.notice pppd[1716]: Terminating connection due to lack of activity. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Connect time 1.4 minutes. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Sent 3090 bytes, received 3869 bytes. Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down started (pid 1751) Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x2 "Link inactive"] Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down finished (pid 1751), status = 0x0 Feb 10 11:02:54 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x3 "Link inactive"] Feb 10 11:02:57 mws3-94700737 daemon.notice pppd[1716]: Connection terminated. Feb 10 11:02:58 mws3-94700737 daemon.notice pppd[1716]: Modem hangup Feb 10 11:02:58 mws3-94700737 daemon.info pppd[1716]: Exit. Feb 10 11:02:58 mws3-94700737 user.notice root: pppd terminated with: 16
I did not hear anything concerning the bug below. Any hints ? Do i need to report somewhere else ?
re,
wh
Quoted 33 lines · walter harms
I found this bug in ppp 2.4.5 (Source:ftp://ftp.samba.org/pub/ppp/ppp-2.4.5.tar.gz).
After idle the pppd should return with 12 (idle timeout) but does return with 16 (hang up). (see log below)
Is this a known problem ? Is there a patch available ?
re,
wh
/var/log/messages:....
Feb 10 11:02:51 mws3-94700737 daemon.notice pppd[1716]: Terminating connection due to lack of activity. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Connect time 1.4 minutes. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Sent 3090 bytes, received 3869 bytes. Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down started (pid 1751) Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x2 "Link inactive"] Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down finished (pid 1751), status = 0x0 Feb 10 11:02:54 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x3 "Link inactive"] Feb 10 11:02:57 mws3-94700737 daemon.notice pppd[1716]: Connection terminated. Feb 10 11:02:58 mws3-94700737 daemon.notice pppd[1716]: Modem hangup Feb 10 11:02:58 mws3-94700737 daemon.info pppd[1716]: Exit. Feb 10 11:02:58 mws3-94700737 user.notice root: pppd terminated with: 16--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 16 lines · walter harms
I found this bug in ppp 2.4.5 (Source:ftp://ftp.samba.org/pub/ppp/ppp-2.4.5.tar.gz).
After idle the pppd should return with 12 (idle timeout) but does return with 16 (hang up).
(see log below)Is this a known problem ? Is there a patch available ?
re,
wh
/var/log/messages:....
Quoted 11 lines
Feb 10 11:02:51 mws3-94700737 daemon.notice pppd[1716]: Terminating connection due to lack of activity. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Connect time 1.4 minutes. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Sent 3090 bytes, received 3869 bytes. Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down started (pid 1751) Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x2 "Link inactive"] Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down finished (pid 1751), status = 0x0 Feb 10 11:02:54 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x3 "Link inactive"] Feb 10 11:02:57 mws3-94700737 daemon.notice pppd[1716]: Connection terminated. Feb 10 11:02:58 mws3-94700737 daemon.notice pppd[1716]: Modem hangup Feb 10 11:02:58 mws3-94700737 daemon.info pppd[1716]: Exit. Feb 10 11:02:58 mws3-94700737 user.notice root: pppd terminated with: 16
Is this talking to a modem attached to a real serial port? I'm wondering what might have caused pppd to see a hangup from the modem.
In any case, I suppose pppd should ignore hangups once we've decided to terminate the link from our end. Patches welcome. :)
Paul.
Quoted 29 lines · Paul Mackerras
Quoted 16 lines · walter harms
I found this bug in ppp 2.4.5 (Source:ftp://ftp.samba.org/pub/ppp/ppp-2.4.5.tar.gz).
After idle the pppd should return with 12 (idle timeout) but does return with 16 (hang up).
(see log below)Is this a known problem ? Is there a patch available ?
re,
wh
/var/log/messages:....
Quoted 11 lines
Feb 10 11:02:51 mws3-94700737 daemon.notice pppd[1716]: Terminating connection due to lack of activity. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Connect time 1.4 minutes. Feb 10 11:02:51 mws3-94700737 daemon.info pppd[1716]: Sent 3090 bytes, received 3869 bytes. Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down started (pid 1751) Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x2 "Link inactive"] Feb 10 11:02:51 mws3-94700737 daemon.debug pppd[1716]: Script /etc/ppp/ip-down finished (pid 1751), status = 0x0 Feb 10 11:02:54 mws3-94700737 daemon.debug pppd[1716]: sent [LCP TermReq id=0x3 "Link inactive"] Feb 10 11:02:57 mws3-94700737 daemon.notice pppd[1716]: Connection terminated. Feb 10 11:02:58 mws3-94700737 daemon.notice pppd[1716]: Modem hangup Feb 10 11:02:58 mws3-94700737 daemon.info pppd[1716]: Exit. Feb 10 11:02:58 mws3-94700737 user.notice root: pppd terminated with: 16
Quoted 6 lines
Is this talking to a modem attached to a real serial port? I'm wondering what might have caused pppd to see a hangup from the modem.
In any case, I suppose pppd should ignore hangups once we've decided to terminate the link from our end. Patches welcome. :)
I took a look into the code but i did not find WHY this is happening. Since 2.4.4 returned the correct value someone familar with the changes should find it more easy.
An yes the modem is connected to the serial port, nothing special. if a patch is available i can test it.
re,
wh
Quoted 3 lines · walter harms
I took a look into the code but i did not find WHY this is happening. Since 2.4.4 returned the correct value someone familar with the changes should find it more easy.
I don't see any changes between 2.4.4 and 2.4.5 that would affect this. I suspect it's a race condition.
Quoted 2 lines
An yes the modem is connected to the serial port, nothing special. if a patch is available i can test it.
Try the below.
Paul.
pppd/main.c +2 -1
@@ -1041,7 +1041,8 @@ get_input() }notice ("Modem hangup" ); hungup =1 ; - status =EXIT_HANGUP ; +if (!(phase =PHASE_TERMINATE || phase =PHASE_DISCONNECT )) + status =EXIT_HANGUP ;lcp_lowerdown (0 );/* serial link is no longer available */ link_terminated (0 );return ;
Quoted 22 lines · Paul Mackerras
Quoted 3 lines · walter harms
I took a look into the code but i did not find WHY this is happening. Since 2.4.4 returned the correct value someone familar with the changes should find it more easy.
I don't see any changes between 2.4.4 and 2.4.5 that would affect this. I suspect it's a race condition.
Quoted 2 lines
An yes the modem is connected to the serial port, nothing special. if a patch is available i can test it.
Try the below.
Paul.
pppd/main.c +0
-0
pppd/main.c get_input() · line 1048
Quoted 9 lines
pppd/main.c +2
-1@@ -1041,7 +1041,8 @@ get_input() }notice ("Modem hangup" ); hungup =1 ; - status =EXIT_HANGUP ; +if (!(phase =PHASE_TERMINATE || phase =PHASE_DISCONNECT )) + status =EXIT_HANGUP ;lcp_lowerdown (0 );/* serial link is no longer available */ link_terminated (0 );return ;
It seems that this did not help:
Terminating connection due to lack of activity. <-------
Connect time 0.6 minutes.
Sent 137 bytes, received 185 bytes.
Script /etc/ppp/ip-down started (pid 918)
sent [LCP TermReq id=0x2 "Link inactive"] Script /etc/ppp/ip-down finished (pid 918), status = 0x0 sent [LCP TermReq id=0x3 "Link inactive"] Connection terminated.
Modem hangup
pppd return value 16 <-----
sorry for the delay we had serious phone problems, someone stole the cable (*twice*)
re,
wh