All of lore.kernel.org
 help / color / mirror / Atom feed
* wrong return code in pppd 2.4.5
@ 2010-02-11  9:06 walter harms
  2010-02-24  9:02 ` walter harms
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: walter harms @ 2010-02-11  9:06 UTC (permalink / raw)
  To: linux-ppp

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong return code in pppd 2.4.5
  2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
@ 2010-02-24  9:02 ` walter harms
  2010-03-06  7:08 ` Paul Mackerras
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: walter harms @ 2010-02-24  9:02 UTC (permalink / raw)
  To: linux-ppp



I did not hear anything concerning the bug below. Any hints ?
Do i need to report somewhere else ?

re,
 wh


walter harms schrieb:
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong return code in pppd 2.4.5
  2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
  2010-02-24  9:02 ` walter harms
@ 2010-03-06  7:08 ` Paul Mackerras
  2010-03-06 11:33 ` walter harms
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Mackerras @ 2010-03-06  7:08 UTC (permalink / raw)
  To: linux-ppp

On Thu, Feb 11, 2010 at 10:06:08AM +0100, walter harms wrote:
> 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

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong return code in pppd 2.4.5
  2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
  2010-02-24  9:02 ` walter harms
  2010-03-06  7:08 ` Paul Mackerras
@ 2010-03-06 11:33 ` walter harms
  2010-03-07  4:25 ` Paul Mackerras
  2010-03-11 16:04 ` walter harms
  4 siblings, 0 replies; 6+ messages in thread
From: walter harms @ 2010-03-06 11:33 UTC (permalink / raw)
  To: linux-ppp



Paul Mackerras schrieb:
> On Thu, Feb 11, 2010 at 10:06:08AM +0100, walter harms wrote:
>> 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
> 
> 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






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wrong return code in pppd 2.4.5
  2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
                   ` (2 preceding siblings ...)
  2010-03-06 11:33 ` walter harms
@ 2010-03-07  4:25 ` Paul Mackerras
  2010-03-11 16:04 ` walter harms
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Mackerras @ 2010-03-07  4:25 UTC (permalink / raw)
  To: linux-ppp

On Sat, Mar 06, 2010 at 12:33:21PM +0100, walter harms wrote:

> 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.

> 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.

diff --git a/pppd/main.c b/pppd/main.c
index 014d614..4236050 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: wrong return code in pppd 2.4.5
  2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
                   ` (3 preceding siblings ...)
  2010-03-07  4:25 ` Paul Mackerras
@ 2010-03-11 16:04 ` walter harms
  4 siblings, 0 replies; 6+ messages in thread
From: walter harms @ 2010-03-11 16:04 UTC (permalink / raw)
  To: linux-ppp



Paul Mackerras schrieb:
> On Sat, Mar 06, 2010 at 12:33:21PM +0100, walter harms wrote:
> 
>> 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.
> 
>> 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.
> 
> diff --git a/pppd/main.c b/pppd/main.c
> index 014d614..4236050 100644
> --- a/pppd/main.c
> +++ b/pppd/main.c
> @@ -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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-11 16:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
2010-02-24  9:02 ` walter harms
2010-03-06  7:08 ` Paul Mackerras
2010-03-06 11:33 ` walter harms
2010-03-07  4:25 ` Paul Mackerras
2010-03-11 16:04 ` walter harms

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.