From nobody@FreeBSD.org  Thu Jul 12 00:13:34 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 4E55337B401
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jul 2001 00:13:33 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.3/8.11.3) id f6C7DXp00212;
	Thu, 12 Jul 2001 00:13:33 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200107120713.f6C7DXp00212@freefall.freebsd.org>
Date: Thu, 12 Jul 2001 00:13:33 -0700 (PDT)
From: Oliver Fischer <plexus@snafu.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: FreeBSD 4.3 freeze when ppp dials over T-DSL
X-Send-Pr-Version: www-1.0

>Number:         28905
>Category:       kern
>Synopsis:       FreeBSD 4.3 freeze when ppp dials over T-DSL
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    wpaul
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 12 00:20:01 PDT 2001
>Closed-Date:    Thu Nov 15 09:48:21 PST 2001
>Last-Modified:  Thu Nov 15 09:53:25 PST 2001
>Originator:     Oliver Fischer
>Release:        4.3
>Organization:
>Environment:
FreeBSD 4.3-RELEASE FreeBSD-RELEASE #4: Tue Jul 10 00:15:43 GMT 2001 root@:/usR/src/sys/compile/WARPGONDEL i386
>Description:
I'm using T-DSL (by the german Telekom) with FBSD 4.3. Mostly 
everything is fine. BUT sometimes whenn I log in as root, call ppp and
enter dial, the system freezes.

Here the last ouput on my screen:

--< snip >--
Fatal trap 12: page fault while in kernel mode
fault virtual address      = 0x4
fault code                 = supervisor write, page not present
instruction pointer        = 0x8:0xc24fa3b
stack pointer              = 0x10:0xd1d1c98
frame pointer              = 0x10:0xd1d1cc8
code segment               = base 0x0, limit 0xfffff, type 0x1b
                           = DPL 0, pres 1, def32 1, gran 1
processor eflags           = interrupt enabled, resume, IOPL = 0
current process            = 208 (ppp)
interrupt mask             = net tty
trap number                = 12
panic: page fault

--< snap >--

Here is the last output of ppp from the logfile (with out time and 
date):

--< snip >---

Phase: Using interface tun0
Phase: deflink: Created in closed state
Phase: PPP Started (interactive mode)
Phase: bundle: Establish
Phase: deflink: closed -> opening

--< snap >---
>How-To-Repeat:
As I have described it above.
>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Thu Jul 12 01:16:51 PDT 2001 
Responsible-Changed-Why:  
I'll look into this 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28905 

From: Brian Somers <brian@Awfulhak.org>
To: Oliver Fischer <plexus@snafu.de>
Cc: freebsd-gnats-submit@FreeBSD.ORG, brian@Awfulhak.org
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Thu, 12 Jul 2001 09:18:18 +0100

 > >Number:         28905
 > >Category:       kern
 > >Synopsis:       FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 Can you enable the following logs in ppp:
 
   set log debug phase lcp ipcp chat command
 
 and send the output along with your ppp configuration for one of 
 these failures ?  Please also cc freebsd-gnats-submit@FreeBSD.ORG.
 
 Thanks
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>, <brian@Awfulhak.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Thu, 12 Jul 2001 11:08:00 +0200

 Yes, I will do it during this evening.
 
 Bye
 Oliver
 
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or 
 finger plexus@xshare.com for more information
 
 
 ----- Original Message ----- 
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: <freebsd-gnats-submit@FreeBSD.ORG>; <brian@Awfulhak.org>
 Sent: Thursday, July 12, 2001 10:18 AM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
 
 
 > > >Number:         28905
 > > >Category:       kern
 > > >Synopsis:       FreeBSD 4.3 freeze when ppp dials over T-DSL
 > 
 > Can you enable the following logs in ppp:
 > 
 >   set log debug phase lcp ipcp chat command
 > 
 > and send the output along with your ppp configuration for one of 
 > these failures ?  Please also cc freebsd-gnats-submit@FreeBSD.ORG.
 > 
 > Thanks
 > -- 
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 > 
 > 
 > 
 > 
 > 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>, <brian@Awfulhak.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Fri, 13 Jul 2001 11:03:56 +0200

 Hi,
 
 here a addition to the problem disciption: The system (IBM ThinkPad T20)
 doesn't freeze if I call ifconfig xl0 up. If I don't do it, the system
 freezes when ppp is dialing.
 
 Bye,
 
 Oliver
 
 P.S: My ppp.conf and the logfile will come later.
 
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: <freebsd-gnats-submit@FreeBSD.ORG>; <brian@Awfulhak.org>
 Sent: Thursday, July 12, 2001 10:18 AM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 
 > > >Number:         28905
 > > >Category:       kern
 > > >Synopsis:       FreeBSD 4.3 freeze when ppp dials over T-DSL
 >
 > Can you enable the following logs in ppp:
 >
 >   set log debug phase lcp ipcp chat command
 >
 > and send the output along with your ppp configuration for one of
 > these failures ?  Please also cc freebsd-gnats-submit@FreeBSD.ORG.
 >
 > Thanks
 > --
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 >
 >
 >
 >
 >
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>, <brian@Awfulhak.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Fri, 13 Jul 2001 11:03:59 +0200

 Hi,
 
 here a addition to the problem disciption: The system (IBM ThinkPad T20)
 doesn't freeze if I call ifconfig xl0 up. If I don't do it, the system
 freezes when ppp is dialing.
 
 Bye,
 
 Oliver
 
 P.S: My ppp.conf and the logfile will come later.
 
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: <freebsd-gnats-submit@FreeBSD.ORG>; <brian@Awfulhak.org>
 Sent: Thursday, July 12, 2001 10:18 AM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 
 > > >Number:         28905
 > > >Category:       kern
 > > >Synopsis:       FreeBSD 4.3 freeze when ppp dials over T-DSL
 >
 > Can you enable the following logs in ppp:
 >
 >   set log debug phase lcp ipcp chat command
 >
 > and send the output along with your ppp configuration for one of
 > these failures ?  Please also cc freebsd-gnats-submit@FreeBSD.ORG.
 >
 > Thanks
 > --
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 >
 >
 >
 >
 >
 

From: Brian Somers <brian@Awfulhak.org>
To: "Oliver Fischer" <plexus@snafu.de>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	freebsd-gnats-submit@FreeBSD.ORG, brian@Awfulhak.org
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Fri, 13 Jul 2001 11:49:00 +0100

 I think this is fixed in the latest sources - there was an issue with 
 sending traffic on an interface that isn't IFF_UP.  Ppp now brings 
 the interface up before using it.
 
 There were ``discussions'' as to whether this should be done this 
 way, but AFAIR the discussion died before a concensus was reached.
 
 Can you try the latest -current or -stable sources and let me know 
 the results ?
 
 Cheers.
 
 > Hi,
 > 
 > here a addition to the problem disciption: The system (IBM ThinkPad T20)
 > doesn't freeze if I call ifconfig xl0 up. If I don't do it, the system
 > freezes when ppp is dialing.
 > 
 > Bye,
 > 
 > Oliver
 > 
 > P.S: My ppp.conf and the logfile will come later.
 
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	<freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Mon, 16 Jul 2001 08:52:44 +0200

 Hi updated to RELENG_4_3 over the weekend, rebuilded the whole system (make
 builworld && make install) and the kernel too. But a call to ppp with a
 following dial command causes a kernel panic again, if I don't start xl0
 with ifconfig  xl0 up.
 
 Bye
 
 Oliver
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: "Brian Somers" <brian@Awfulhak.org>; <freebsd-gnats-submit@FreeBSD.ORG>;
 <brian@Awfulhak.org>
 Sent: Friday, July 13, 2001 12:49 PM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 
 > I think this is fixed in the latest sources - there was an issue with
 > sending traffic on an interface that isn't IFF_UP.  Ppp now brings
 > the interface up before using it.
 >
 > There were ``discussions'' as to whether this should be done this
 > way, but AFAIR the discussion died before a concensus was reached.
 >
 > Can you try the latest -current or -stable sources and let me know
 > the results ?
 >
 > Cheers.
 >
 > > Hi,
 > >
 > > here a addition to the problem disciption: The system (IBM ThinkPad T20)
 > > doesn't freeze if I call ifconfig xl0 up. If I don't do it, the system
 > > freezes when ppp is dialing.
 > >
 > > Bye,
 > >
 > > Oliver
 > >
 > > P.S: My ppp.conf and the logfile will come later.
 >
 > --
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 >
 >
 >
 >
 >
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Mon, 16 Jul 2001 13:44:40 +0200

 Ok, here the result:
 
 Revision of user.sbin/ppp/ether.c is 1.9.2.6
 
 DDB says: stopped at: xl_encap_90xB+0x12:  movl $0,0x4(%eax)
 
 Bye
 
 Oliver
 
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: <brian@FreeBSD.org>; <brian@Awfulhak.org>
 Sent: Monday, July 16, 2001 10:20 AM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 
 > Can you confirm that ddb says you're dying in xl_start() and that
 > you've got at least version 1.9.2.6 of usr.sbin/ppp/ether.c (you've
 > probably got version 1.9.2.8).
 >
 > Cheers.
 >
 > > The following reply was made to PR kern/28905; it has been noted by
 GNATS.
 > >
 > > From: "Oliver Fischer" <plexus@snafu.de>
 > > To: "Brian Somers" <brian@Awfulhak.org>
 > > Cc: "Brian Somers" <brian@Awfulhak.org>,
 > > <freebsd-gnats-submit@FreeBSD.ORG>
 > > Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 > > Date: Mon, 16 Jul 2001 08:52:44 +0200
 > >
 > >  Hi updated to RELENG_4_3 over the weekend, rebuilded the whole system
 (make
 > >  builworld && make install) and the kernel too. But a call to ppp with a
 > >  following dial command causes a kernel panic again, if I don't start
 xl0
 > >  with ifconfig  xl0 up.
 > >
 > >  Bye
 > >
 > >  Oliver
 > >
 > >  --
 > >  Oliver Fischer - mailto:plexus@snafu.de
 > >  http://www.xshare.com/~plexus/ or
 > >  finger plexus@xshare.com for more information
 > >
 > >
 > >  ----- Original Message -----
 > >  From: "Brian Somers" <brian@Awfulhak.org>
 > >  To: "Oliver Fischer" <plexus@snafu.de>
 > >  Cc: "Brian Somers" <brian@Awfulhak.org>;
 <freebsd-gnats-submit@FreeBSD.ORG>;
 > >  <brian@Awfulhak.org>
 > >  Sent: Friday, July 13, 2001 12:49 PM
 > >  Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 > >
 > >
 > >  > I think this is fixed in the latest sources - there was an issue with
 > >  > sending traffic on an interface that isn't IFF_UP.  Ppp now brings
 > >  > the interface up before using it.
 > >  >
 > >  > There were ``discussions'' as to whether this should be done this
 > >  > way, but AFAIR the discussion died before a concensus was reached.
 > >  >
 > >  > Can you try the latest -current or -stable sources and let me know
 > >  > the results ?
 > >  >
 > >  > Cheers.
 > >  >
 > >  > > Hi,
 > >  > >
 > >  > > here a addition to the problem disciption: The system (IBM ThinkPad
 T20)
 > >  > > doesn't freeze if I call ifconfig xl0 up. If I don't do it, the
 system
 > >  > > freezes when ppp is dialing.
 > >  > >
 > >  > > Bye,
 > >  > >
 > >  > > Oliver
 > >  > >
 > >  > > P.S: My ppp.conf and the logfile will come later.
 >
 > --
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 >
 >
 >
 >
 >
 

From: Brian Somers <brian@Awfulhak.org>
To: "Oliver Fischer" <plexus@snafu.de>
Cc: Brian Somers <brian@Awfulhak.org>, Bill Paul <wpaul@FreeBSD.ORG>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Mon, 16 Jul 2001 14:16:11 +0100

 It looks like a problem in the xl driver -- xl_encap_90xB() is making 
 assumptions that c->xl_ptr isn't NULL.  It's probably not supposed to 
 be NULL though.  ng_pppoe may be confusing things in this respect.  
 I've cc'd Bill in case he wants to do anything about that.
 
 I'm a little surprised you've only got version 1.9.2.6 of ether.c -- 
 this was modified in May.  Perhaps your update didn't go as smoothly 
 as you suspect -- you've got the 4.3-RELEASE version.
 
 The only thing that I can guess might be causing the problem is that 
 I'm bringing the interface up too late.  Can you try this patch as an 
 experiment to see if it makes things work ?
 
 Ta.
 
 > Ok, here the result:
 > 
 > Revision of user.sbin/ppp/ether.c is 1.9.2.6
 > 
 > DDB says: stopped at: xl_encap_90xB+0x12:  movl $0,0x4(%eax)
 > 
 > Bye
 > 
 > Oliver
 
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 Index: ether.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/ppp/ether.c,v
 retrieving revision 1.9.2.8
 diff -u -r1.9.2.8 ether.c
 --- ether.c	2001/07/09 01:37:15	1.9.2.8
 +++ ether.c	2001/07/16 13:08:09
 @@ -497,6 +497,10 @@
       * magically exist as a way of hooking stuff onto an ethernet device
       */
      path = (char *)alloca(ifacelen + 2);
 +    sprintf(path, "%.*s", ifacelen, iface);
 +    if (!iface_SetFlags(path, IFF_UP))
 +      log_Printf(LogWARN, "%s: Failed (1) to set the IFF_UP flag on %s\n",
 +                 p->link.name, path);
      sprintf(path, "%.*s:", ifacelen, iface);
      if (NgSendMsg(dev->cs, path, NGM_GENERIC_COOKIE, NGM_LISTHOOKS,
                    NULL, 0) < 0) {
 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Wed, 18 Jul 2001 10:30:41 +0200

 Hi Brian,
 
 yesterday I found time to check it. I applied your patch succesfully and the
 problem was fixed. Now I could call ppp and enter the dial command without
 any problems.
 
 But one question is still left: Why is it fixed in ppp and not in the
 kernel? I think, the kernel should be stable enough to deal even with the
 previous version of ppp.
 
 BTW, you have written, what this problem should be fixed on 4.3 stable and I
 think I am tracking 4.3 stable. The output of cvs status ether.c says, that
 I stick to RELENG_4_3.
 
 Bye
 Oliver
 
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: "Brian Somers" <brian@Awfulhak.org>; "Bill Paul" <wpaul@FreeBSD.ORG>;
 <FreeBSD-gnats-submit@FreeBSD.ORG>
 Sent: Monday, July 16, 2001 3:16 PM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 
 > It looks like a problem in the xl driver -- xl_encap_90xB() is making
 > assumptions that c->xl_ptr isn't NULL.  It's probably not supposed to
 > be NULL though.  ng_pppoe may be confusing things in this respect.
 > I've cc'd Bill in case he wants to do anything about that.
 >
 > I'm a little surprised you've only got version 1.9.2.6 of ether.c --
 > this was modified in May.  Perhaps your update didn't go as smoothly
 > as you suspect -- you've got the 4.3-RELEASE version.
 >
 > The only thing that I can guess might be causing the problem is that
 > I'm bringing the interface up too late.  Can you try this patch as an
 > experiment to see if it makes things work ?
 >
 > Ta.
 >
 > > Ok, here the result:
 > >
 > > Revision of user.sbin/ppp/ether.c is 1.9.2.6
 > >
 > > DDB says: stopped at: xl_encap_90xB+0x12:  movl $0,0x4(%eax)
 > >
 > > Bye
 > >
 > > Oliver
 >
 > --
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 >
 > Index: ether.c
 > ===================================================================
 > RCS file: /home/ncvs/src/usr.sbin/ppp/ether.c,v
 > retrieving revision 1.9.2.8
 > diff -u -r1.9.2.8 ether.c
 > --- ether.c 2001/07/09 01:37:15 1.9.2.8
 > +++ ether.c 2001/07/16 13:08:09
 > @@ -497,6 +497,10 @@
 >       * magically exist as a way of hooking stuff onto an ethernet device
 >       */
 >      path = (char *)alloca(ifacelen + 2);
 > +    sprintf(path, "%.*s", ifacelen, iface);
 > +    if (!iface_SetFlags(path, IFF_UP))
 > +      log_Printf(LogWARN, "%s: Failed (1) to set the IFF_UP flag on
 %s\n",
 > +                 p->link.name, path);
 >      sprintf(path, "%.*s:", ifacelen, iface);
 >      if (NgSendMsg(dev->cs, path, NGM_GENERIC_COOKIE, NGM_LISTHOOKS,
 >                    NULL, 0) < 0) {
 
Responsible-Changed-From-To: brian->wpaul 
Responsible-Changed-By: brian 
Responsible-Changed-When: Wed Jul 18 02:35:07 PDT 2001 
Responsible-Changed-Why:  
xl and fxp are known to have problems when sent packets before they're IFF_UP. 
Hopefully Bill can look at ironing these glitches out of these and any other 
NIC drivers that suffer from this problem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28905 

From: Brian Somers <brian@Awfulhak.org>
To: "Oliver Fischer" <plexus@snafu.de>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, FreeBSD-gnats-submit@FreeBSD.ORG,
	Julian Elischer <julian@elischer.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Wed, 18 Jul 2001 10:35:25 +0100

 Hi,
 
 Yes, you're right.  I'm not disputing that the driver shouldn't die 
 when it's sent packets and isn't IFF_UP.  This needs to be fixed, and 
 several of the NIC drivers are guilty of it.... (fxp has been 
 reported guilty of this as well as xl -- maybe more).
 
 The arguable issue here is whether the NIC drivers should drop data 
 they're sent if they're not IFF_UP.  IMHO, they should -- or maybe even 
 netgraph should be dropping the data (Julian cc'd).  To this end, I 
 added code to ppp to make that end of things work correctly (using my 
 unagreed definition of correct), ie, to bring the Ethernet interface 
 up at open time, but now I see that I've simply brought the interface 
 up too late - after netgraph has done the PPPoE discovery bit.
 
 Unfortunately (again IMHO), my fix will mask the problem -- things 
 will just start to work again.... until somebody else does this sort 
 of thing from userland.
 
 I've just committed a fix to -current and will MFC in a weeks time.  
 If you could look at testing it (I think it's more correct than the 
 previous one) it'd be appreciated.  I've attached it here for your 
 convenience as it's not very big.
 
 Cheers.
 
 > Hi Brian,
 > 
 > yesterday I found time to check it. I applied your patch succesfully and the
 > problem was fixed. Now I could call ppp and enter the dial command without
 > any problems.
 > 
 > But one question is still left: Why is it fixed in ppp and not in the
 > kernel? I think, the kernel should be stable enough to deal even with the
 > previous version of ppp.
 > 
 > BTW, you have written, what this problem should be fixed on 4.3 stable and I
 > think I am tracking 4.3 stable. The output of cvs status ether.c says, that
 > I stick to RELENG_4_3.
 > 
 > Bye
 > Oliver
 > 
 > 
 > --
 > Oliver Fischer - mailto:plexus@snafu.de
 > http://www.xshare.com/~plexus/ or
 > finger plexus@xshare.com for more information
 > 
 > 
 > ----- Original Message -----
 > From: "Brian Somers" <brian@Awfulhak.org>
 > To: "Oliver Fischer" <plexus@snafu.de>
 > Cc: "Brian Somers" <brian@Awfulhak.org>; "Bill Paul" <wpaul@FreeBSD.ORG>;
 > <FreeBSD-gnats-submit@FreeBSD.ORG>
 > Sent: Monday, July 16, 2001 3:16 PM
 > Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 > 
 > 
 > > It looks like a problem in the xl driver -- xl_encap_90xB() is making
 > > assumptions that c->xl_ptr isn't NULL.  It's probably not supposed to
 > > be NULL though.  ng_pppoe may be confusing things in this respect.
 > > I've cc'd Bill in case he wants to do anything about that.
 > >
 > > I'm a little surprised you've only got version 1.9.2.6 of ether.c --
 > > this was modified in May.  Perhaps your update didn't go as smoothly
 > > as you suspect -- you've got the 4.3-RELEASE version.
 > >
 > > The only thing that I can guess might be causing the problem is that
 > > I'm bringing the interface up too late.  Can you try this patch as an
 > > experiment to see if it makes things work ?
 > >
 > > Ta.
 > >
 > > > Ok, here the result:
 > > >
 > > > Revision of user.sbin/ppp/ether.c is 1.9.2.6
 > > >
 > > > DDB says: stopped at: xl_encap_90xB+0x12:  movl $0,0x4(%eax)
 > > >
 > > > Bye
 > > >
 > > > Oliver
 > >
 > > --
 > > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 > >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 > >
 > > Index: ether.c
 > > ===================================================================
 > > RCS file: /home/ncvs/src/usr.sbin/ppp/ether.c,v
 > > retrieving revision 1.9.2.8
 > > diff -u -r1.9.2.8 ether.c
 > > --- ether.c 2001/07/09 01:37:15 1.9.2.8
 > > +++ ether.c 2001/07/16 13:08:09
 > > @@ -497,6 +497,10 @@
 > >       * magically exist as a way of hooking stuff onto an ethernet device
 > >       */
 > >      path = (char *)alloca(ifacelen + 2);
 > > +    sprintf(path, "%.*s", ifacelen, iface);
 > > +    if (!iface_SetFlags(path, IFF_UP))
 > > +      log_Printf(LogWARN, "%s: Failed (1) to set the IFF_UP flag on
 > %s\n",
 > > +                 p->link.name, path);
 > >      sprintf(path, "%.*s:", ifacelen, iface);
 > >      if (NgSendMsg(dev->cs, path, NGM_GENERIC_COOKIE, NGM_LISTHOOKS,
 > >                    NULL, 0) < 0) {
 > 
 
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 Index: ether.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/ppp/ether.c,v
 retrieving revision 1.19
 diff -u -r1.19 ether.c
 --- ether.c	2001/06/18 14:59:33	1.19
 +++ ether.c	2001/07/18 09:28:03
 @@ -595,6 +595,12 @@
        return ether_Abandon(dev, p);
      }
  
 +    /* Bring the Ethernet interface up */
 +    path[ifacelen] = '\0';	/* Remove the trailing ':' */
 +    if (!iface_SetFlags(path, IFF_UP))
 +      log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
 +                 p->link.name, path);
 +
      /* And finally, request a connection to the given provider */
  
      data = (struct ngpppoe_init_data *)alloca(sizeof *data + providerlen);
 @@ -675,16 +681,6 @@
  
    if (dev) {
      physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNCNOACF);
 -
 -    if (path != NULL) {
 -      /* Mark the interface as UP if it's not already */
 -
 -      path[ifacelen] = '\0';		/* Remove the trailing ':' */
 -      if (!iface_SetFlags(path, IFF_UP))
 -        log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
 -                   p->link.name, path);
 -    }
 -
      return &dev->dev;
    }
  
 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, <FreeBSD-gnats-submit@FreeBSD.ORG>,
	"Julian Elischer" <julian@elischer.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Wed, 18 Jul 2001 13:25:33 +0200

 I will apply it to RELENG_4_3 on my machine during the evening.
 
 Bye
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or 
 finger plexus@xshare.com for more information
 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, <FreeBSD-gnats-submit@FreeBSD.ORG>,
	"Julian Elischer" <julian@elischer.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Wed, 18 Jul 2001 19:28:05 +0200

 Hi,
 I wasn't able to apply the patch. May you could send me the patch as an
 separat attachment?
 
 Bye
 
 Oliver
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 

From: Brian Somers <brian@Awfulhak.org>
To: "Oliver Fischer" <plexus@snafu.de>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, FreeBSD-gnats-submit@FreeBSD.ORG,
	"Julian Elischer" <julian@elischer.org>, brian@Awfulhak.org
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Wed, 18 Jul 2001 18:53:10 +0100

 This is a multipart MIME message.
 
 --==_Exmh_-2250765100
 Content-Type: text/plain; charset=us-ascii
 
 Sure.
 
 > Hi,
 > I wasn't able to apply the patch. May you could send me the patch as an
 > separat attachment?
 > 
 > Bye
 > 
 > Oliver
 > 
 > --
 > Oliver Fischer - mailto:plexus@snafu.de
 > http://www.xshare.com/~plexus/ or
 > finger plexus@xshare.com for more information
 
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 
 --==_Exmh_-2250765100
 Content-Type: text/plain ; name="p"; charset=us-ascii
 Content-Description: ppp.patch
 Content-Disposition: attachment; filename="p"
 
 Index: ether.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/ppp/ether.c,v
 retrieving revision 1.19
 diff -u -r1.19 ether.c
 --- ether.c	2001/06/18 14:59:33	1.19
 +++ ether.c	2001/07/18 09:28:03
 @@ -595,6 +595,12 @@
        return ether_Abandon(dev, p);
      }
  
 +    /* Bring the Ethernet interface up */
 +    path[ifacelen] = '\0';	/* Remove the trailing ':' */
 +    if (!iface_SetFlags(path, IFF_UP))
 +      log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
 +                 p->link.name, path);
 +
      /* And finally, request a connection to the given provider */
  
      data = (struct ngpppoe_init_data *)alloca(sizeof *data + providerlen);
 @@ -675,16 +681,6 @@
  
    if (dev) {
      physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNCNOACF);
 -
 -    if (path != NULL) {
 -      /* Mark the interface as UP if it's not already */
 -
 -      path[ifacelen] = '\0';		/* Remove the trailing ':' */
 -      if (!iface_SetFlags(path, IFF_UP))
 -        log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
 -                   p->link.name, path);
 -    }
 -
      return &dev->dev;
    }
  
 
 --==_Exmh_-2250765100--
 
 

From: "Oliver Fischer" <plexus@snafu.de>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, <FreeBSD-gnats-submit@FreeBSD.ORG>,
	"Julian Elischer" <julian@elischer.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Thu, 19 Jul 2001 18:15:53 +0200

 Sorry Brian, your patch it is not possible to apply your patch to ether.c
 from RELENG_4_3. :(
 
 BYe,
 
 Oliver
 
 --
 Oliver Fischer - mailto:plexus@snafu.de
 http://www.xshare.com/~plexus/ or
 finger plexus@xshare.com for more information
 
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: "Oliver Fischer" <plexus@snafu.de>
 Cc: "Brian Somers" <brian@Awfulhak.org>; "Bill Paul" <wpaul@FreeBSD.ORG>;
 <FreeBSD-gnats-submit@FreeBSD.ORG>; "Julian Elischer" <julian@elischer.org>;
 <brian@Awfulhak.org>
 Sent: Wednesday, July 18, 2001 7:53 PM
 Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
 
 
 > Sure.
 >
 > > Hi,
 > > I wasn't able to apply the patch. May you could send me the patch as an
 > > separat attachment?
 > >
 > > Bye
 > >
 > > Oliver
 > >
 > > --
 > > Oliver Fischer - mailto:plexus@snafu.de
 > > http://www.xshare.com/~plexus/ or
 > > finger plexus@xshare.com for more information
 >
 > --
 > Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
 >       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 > Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 >
 >
 

From: Brian Somers <brian@Awfulhak.org>
To: "Oliver Fischer" <plexus@snafu.de>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	"Bill Paul" <wpaul@FreeBSD.ORG>, FreeBSD-gnats-submit@FreeBSD.ORG,
	"Julian Elischer" <julian@elischer.org>, brian@Awfulhak.org
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL 
Date: Mon, 23 Jul 2001 13:01:00 +0100

 > Sorry Brian, your patch it is not possible to apply your patch to ether.c
 > from RELENG_4_3. :(
 > 
 > BYe,
 > 
 > Oliver
 
 If you want to apply the changes, go into the ppp src directory and do
 
   cvs diff -r1.19 -r1.20 -u -kk ether.c | patch
 
 That works here.  If it doesn't work for you, simply wait for the MFC 
 in 2 more days.
 
 > --
 > Oliver Fischer - mailto:plexus@snafu.de
 > http://www.xshare.com/~plexus/ or
 > finger plexus@xshare.com for more information
 
 -- 
 Brian <brian@freebsd-services.com>                <brian@Awfulhak.org>
       http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
 Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
 
 

From: Oliver Fischer <plexus@snafu.de>
To: Brian Somers <brian@Awfulhak.org>
Cc: Bill Paul <wpaul@FreeBSD.ORG>, FreeBSD-gnats-submit@FreeBSD.ORG,
	Julian Elischer <julian@elischer.org>
Subject: Re: kern/28905: FreeBSD 4.3 freeze when ppp dials over T-DSL
Date: Wed, 25 Jul 2001 23:23:06 +0000

 Hi Brian,
 
 I applyed the patch to ppp and it works fine. Thanks!!!!
 
 Best wishes from Berlin
 
 Oliver
 
 
State-Changed-From-To: open->closed 
State-Changed-By: asmodai 
State-Changed-When: Thu Nov 15 09:48:21 PST 2001 
State-Changed-Why:  
Fixed in STABLE and CURRENT. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28905 
>Unformatted:
