From nobody  Thu Jan  7 20:17:58 1999
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id UAA25831;
          Thu, 7 Jan 1999 20:17:58 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199901080417.UAA25831@hub.freebsd.org>
Date: Thu, 7 Jan 1999 20:17:58 -0800 (PST)
From: Toshiomi.Moriki@ma1.seikyou.ne.jp
To: freebsd-gnats-submit@freebsd.org
Subject: BUG report for ppp(8)
X-Send-Pr-Version: www-1.0

>Number:         9382
>Category:       bin
>Synopsis:       BUG report for ppp(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan  7 20:20:01 PST 1999
>Closed-Date:    Fri Jan 8 01:08:55 PST 1999
>Last-Modified:  Fri Jan  8 13:50:00 PST 1999
>Originator:     Toshiomi Moriki
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
kyushu university, Japan
>Environment:
FreeBSD witch.seikyou.ne.jp 3.0-RELEASE FreeBSD 3.0-RELEASE #10: Thu Dec 10 21:57:42 JST 1998     moriki@witch.seikyou.ne.jp:/usr/src/sys/compile/WITCH  i386
>Description:
This BUGS confuse 3.0-current/release/2.8-release users.
Behaviors of ppp(8) is different from those on manual pages.

ppp(8) can set the phone number like this.

set phone "111[|222]...[:333[|444]...]...

According to the manual page, pipe separated numbers used
"*only* if the dial or login script fails,"
but ppp(8) uses these numbers always.

The timestamp of ppp(8) is
#       $Id: Makefile,v 1.50 1998/10/22 02:32:48 brian Exp $
>How-To-Repeat:
Begins ppp(8), and set "pipe separated" multiple phone numbers
on ppp prompt, like this.

ppp ON mysite> set phone "111|222"

And, dial.

ppp ON mysite> dial

If first dial attempt(in that example, "111") succeeded, 
expected number is "111" on the manual page.
But the number really used on next dial attempt is "222".

>Fix:
This patch will fix the problem.

*** datalink.c.orig	Fri Jan  8 10:29:25 1999
--- datalink.c	Fri Jan  8 11:28:10 1999
***************
*** 299,304 ****
--- 299,305 ----
                datalink_HangupDone(dl);
                break;
              case DATALINK_DIAL:
+ 	      dl->phone.alt = NULL; /* phone attempt succeeded */
                datalink_NewState(dl, DATALINK_LOGIN);
                chat_Init(&dl->chat, dl->physical, dl->cfg.script.login, 0, NULL);
                return datalink_UpdateSet(d, r, w, e, n);

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Fri Jan 8 01:08:55 PST 1999 
State-Changed-Why:  
Fixed in -current & -stable. 
See the following mail (this evening) re the patch applied 
. 

From: Brian Somers <brian@Awfulhak.org>
To: Toshiomi.Moriki@ma1.seikyou.ne.jp
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/9382: BUG report for ppp(8) 
Date: Fri, 08 Jan 1999 08:29:42 +0000

 > 
 > >Number:         9382
 > >Category:       bin
 > >Synopsis:       BUG report for ppp(8)
 [.....]
 > >Fix:
 > This patch will fix the problem.
 > 
 > *** datalink.c.orig	Fri Jan  8 10:29:25 1999
 > --- datalink.c	Fri Jan  8 11:28:10 1999
 > ***************
 > *** 299,304 ****
 > --- 299,305 ----
 >                 datalink_HangupDone(dl);
 >                 break;
 >               case DATALINK_DIAL:
 > + 	      dl->phone.alt = NULL; /* phone attempt succeeded */
 >                 datalink_NewState(dl, DATALINK_LOGIN);
 >                 chat_Init(&dl->chat, dl->physical, dl->cfg.script.login, 0, NULL);
 >                 return datalink_UpdateSet(d, r, w, e, n);
 [.....]
 
 You're right, but the assignment should be for the DATALINK_LOGIN 
 case rather than the DATALINK_DIAL one.  When DATALINK_DIAL has 
 succeeded, there's still time for the _LOGIN to fail.
 
 -- 
 Brian <brian@Awfulhak.org> <brian@FreeBSD.org> <brian@OpenBSD.org>
       <http://www.Awfulhak.org>
 Don't _EVER_ lose your sense of humour !
 
 
>Unformatted:
