From nobody@FreeBSD.org  Thu Jul 15 23:05:12 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 47EAE16A4D0
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Jul 2004 23:05:12 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4038343D54
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Jul 2004 23:05:12 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i6FN5CYO014895
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Jul 2004 23:05:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i6FN5CCg014894;
	Thu, 15 Jul 2004 23:05:12 GMT
	(envelope-from nobody)
Message-Id: <200407152305.i6FN5CCg014894@www.freebsd.org>
Date: Thu, 15 Jul 2004 23:05:12 GMT
From: Martin <nakal@web.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: PPPoE broken in -CURRENT
X-Send-Pr-Version: www-2.3

>Number:         69133
>Category:       kern
>Synopsis:       PPPoE broken in -CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 15 23:10:15 GMT 2004
>Closed-Date:    Tue Oct 05 12:57:52 GMT 2004
>Last-Modified:  Tue Oct 05 12:57:52 GMT 2004
>Originator:     Martin
>Release:        CURRENT
>Organization:
>Environment:
FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Jul 15 23:39:34 CEST 2004 i386
>Description:
Since 2 weeks, I cannot use PPPoE with the latest kernels. I'm using the large German ISP "T-Online" with a xl NIC.

The ppp logs show me connects and immediate disconnects without sending any PPPoE frames.

Note:
This is a bug in the latest kernel, not the ppp application. I still have an older kernel (date: 2004/05/18) which still boots with the latest userland.

>How-To-Repeat:
Using T-Online as ISP, execute ppp with the proper ppp.conf and watch the logs in ppp.log (NIC: xl; -CURRENT).

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Thu Jul 15 23:44:48 GMT 2004 
Responsible-Changed-Why:  
Take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69133 

From: Gleb Smirnoff <glebius@freebsd.org>
To: Martin <nakal@web.de>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Fri, 16 Jul 2004 03:50:52 +0400

   Martin,
 
 On Thu, Jul 15, 2004 at 11:05:12PM +0000, Martin wrote:
 M> >Description:
 M> Since 2 weeks, I cannot use PPPoE with the latest kernels. I'm using the large German ISP "T-Online" with a xl NIC.
 M> This is a bug in the latest kernel, not the ppp application. I still have an older kernel (date: 2004/05/18) which still boots with the latest userland.
 
 Please provide us with more information:
 
 - do you have options NETGRAPH, NETGRAPH_ETHER, NETGRAPH_SOCKET,
   NETGRAPH_PPPOE, NETGRAPH_ETHER in kernel config or you use modules?
 - can you confirm that you have rebuilt and installed all modules when
   building a new kernel?
 - can you show your ppp configuration, sample logs, tcpdump output
   when ppp tries to connect?
 - can you show output of `ident /boot/kernel/ng_{pppoe,socket,ether}.ko'
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Martin <nakal@web.de>
To: Gleb Smirnoff <glebius@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Fri, 16 Jul 2004 03:02:56 +0200

 Am Fr, den 16.07.2004 schrieb Gleb Smirnoff um 1:50:
 
 > Please provide us with more information:
 > 
 > - do you have options NETGRAPH, NETGRAPH_ETHER, NETGRAPH_SOCKET,
 >   NETGRAPH_PPPOE, NETGRAPH_ETHER in kernel config or you use modules?
 
 I'm using modules:
 kldstat:
 9    4 0xc183a000 10000    netgraph.ko
 10    2 0xc184e000 4000     ng_ether.ko
 11    1 0xc1853000 7000     ng_pppoe.ko
 12    1 0xc185a000 4000     ng_socket.ko
 
 > - can you confirm that you have rebuilt and installed all modules when
 >   building a new kernel?
 
 I'm always erasing /usr/obj before rebuilding world and kernel.
 Is it correct?
 
 > - can you show your ppp configuration, sample logs, tcpdump output
 >   when ppp tries to connect?
 
 -- ppp.conf --------------------------------
 default:
 set log Phase Chat LCP IPCP CCP tun command
 set ifaddr 10.0.0.1/0 10.0.0.2/0
 # enable dns
 
 tonline:
 set device PPPoE:xl0
 set authname "XXXXXXXXXXXXXXX"
 set authkey "XXXXXXXXXXXXX"
 set dial
 set login
 add default HISADDR
 --------------------------------------------
 
 -- ppp.log (verbose, failure) --------------
 Jul  3 19:58:51 klotz ppp[764]: Phase: Using interface: tun0
 Jul  3 19:58:51 klotz ppp[764]: Phase: deflink: Created in closed state
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: default: set ifaddr
 10.0.0.1/0 10
 .0.0.2/0
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: set log all
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: set device
 PPPoE:xl0
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: set authname
 xxxx
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: set authkey
 ********
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: set dial
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: set login
 Jul  3 19:58:51 klotz ppp[764]: tun0: Command: tonline: add default
 HISADDR
 Jul  3 19:58:51 klotz ppp[764]: tun0: ID0: 9 = socket(17, 3, 0)
 Jul  3 19:58:51 klotz ppp[764]: tun0: ID0: -1 = write(9, data, 140)
 Jul  3 19:58:51 klotz ppp[764]: tun0: TCP/IP: rt_Set failure:
 Jul  3 19:58:51 klotz ppp[764]: tun0: TCP/IP: rt_Set:  Cmd = Add
 Jul  3 19:58:51 klotz ppp[764]: tun0: TCP/IP: rt_Set:  Dst = 0.0.0.0/0
 Jul  3 19:58:51 klotz ppp[764]: tun0: TCP/IP: rt_Set:  Gateway =
 10.0.0.2
 Jul  3 19:58:51 klotz ppp[764]: tun0: Debug: wrote -1: cmd = Add, dst =
 0.0.0.0/0, gateway = 10.0.0.2
 Jul  3 19:58:51 klotz ppp[765]: tun0: ID0: 0x282e22e0 =
 fopen("/var/run/tun0.pid", "w")
 Jul  3 19:58:51 klotz ppp[765]: tun0: Phase: PPP Started (ddial mode).
 Jul  3 19:58:51 klotz ppp[765]: tun0: Phase: bundle: Establish
 Jul  3 19:58:51 klotz ppp[765]: tun0: Phase: deflink: closed -> opening
 Jul  3 19:58:51 klotz ppp[765]: tun0: ID0: 0 = NgMkSockNode("", &cs,
 &ds)
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug: List of netgraph node
 ``xl0:'' (id 1) hooks:
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug:   Found orphans -> ethernet
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug: Connecting netgraph socket
 .:tun0 -
 > [4]::tun0
 Jul  3 19:58:51 klotz ppp[765]: tun0: ID0: 2 = socket(2, 2, 0)
 Jul  3 19:58:51 klotz ppp[765]: tun0: ID0: 0 = ioctl(2, 3223349521,
 0xbfbfddb0)
 Jul  3 19:58:51 klotz ppp[765]: tun0: ID0: 0 = ioctl(2, 2149607696,
 0xbfbfddb0)
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug: Sending PPPOE_CONNECT to
 .:tun0
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug: Found the following
 interfaces:
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug:  Index 1, name "xl0"
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug:  Index 2, name "ep0"
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug:  Index 3, name "pflog0"
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug:  Index 4, name "lo0"
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug:  Index 5, name "tun0"
 Jul  3 19:58:51 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:58:51 klotz ppp[765]: tun0: Phase: deflink: Connected!
 Jul  3 19:58:51 klotz ppp[765]: tun0: Phase: deflink: opening -> dial
 Jul  3 19:58:51 klotz ppp[765]: tun0: Phase: deflink: dial -> carrier
 Jul  3 19:58:51 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:58:52 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:58:52 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:58:52 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:58:52 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:58:52 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:58:52 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:58:53 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:58:53 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:58:53 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:58:53 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:58:53 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical thr
 oughput timer[0x80be068]
 Jul  3 19:58:53 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:58:54 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:58:54 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:58:54 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068
 ]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:58:54 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:58:54 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical thr
 oughput timer[0x80be068]
 Jul  3 19:58:54 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:58:55 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:58:55 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:58:55 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068
 ]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:58:55 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:58:55 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical thr
 oughput timer[0x80be068]
 Jul  3 19:58:55 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:58:56 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:58:56 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:58:56 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068
 ]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:58:56 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:58:56 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical thr
 oughput timer[0x80be068]
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase: deflink: Disconnected!
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase: deflink: carrier -> hangup
 Jul  3 19:58:56 klotz ppp[765]: tun0: Debug: deflink: Close
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase: deflink: Connect time: 5
 secs: 0 oc
 tets in, 0 octets out
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase: deflink: 0 packets in, 0
 packets ou
 t
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase:  total 0 bytes/sec, peak 0
 bytes/se
 c on Sat Jul  3 19:58:51 2004
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase: deflink: hangup -> opening
 Jul  3 19:58:56 klotz ppp[765]: tun0: Timer: timer_Start: Inserting dial
 timer[0x80bcd44]
 Jul  3 19:58:56 klotz ppp[765]: tun0: Phase: deflink: Enter pause (30)
 for redia
 ling.
 Jul  3 19:59:26 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:59:26 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:59:26 klotz ppp[765]: tun0: Timer: dial timer[0x80bcd44]: freq
 = 30.00
 s, next = 0.00s, state = running
 Jul  3 19:59:26 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:59:26 klotz ppp[765]: tun0: Chat: deflink: Redial timer
 expired.
 Jul  3 19:59:26 klotz ppp[765]: tun0: ID0: 0 = NgMkSockNode("", &cs,
 &ds)
 Jul  3 19:59:26 klotz ppp[765]: tun0: Debug: List of netgraph node
 ``xl0:'' (id 
 1) hooks:
 Jul  3 19:59:26 klotz ppp[765]: tun0: Debug:   Found orphans -> ethernet
 Jul  3 19:59:26 klotz ppp[765]: tun0: Debug: Connecting netgraph socket
 .:tun0 -
 > [4]::tun0
 Jul  3 19:59:26 klotz ppp[765]: tun0: ID0: 2 = socket(2, 2, 0)
 Jul  3 19:59:26 klotz ppp[765]: tun0: ID0: 0 = ioctl(2, 3223349521,
 0xbfbfddb0)
 Jul  3 19:59:26 klotz ppp[765]: tun0: ID0: 0 = ioctl(2, 2149607696,
 0xbfbfddb0)
 Jul  3 19:59:26 klotz ppp[765]: tun0: Debug: Sending PPPOE_CONNECT to
 .:tun0
 Jul  3 19:59:26 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:59:26 klotz ppp[765]: tun0: Phase: deflink: Connected!
 Jul  3 19:59:26 klotz ppp[765]: tun0: Phase: deflink: opening -> dial
 Jul  3 19:59:26 klotz ppp[765]: tun0: Phase: deflink: dial -> carrier
 Jul  3 19:59:26 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:59:27 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:59:27 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:59:27 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068
 ]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:59:27 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:59:27 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:59:27 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:59:28 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:59:28 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:59:28 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:59:28 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:59:28 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:59:28 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:59:29 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:59:29 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:59:29 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:59:29 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:59:29 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:59:29 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:59:30 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:59:30 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:59:30 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:59:30 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:59:30 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:59:30 klotz ppp[765]: tun0: Debug: Waiting for carrier
 Jul  3 19:59:31 klotz ppp[765]: tun0: Timer: Select returns -1
 Jul  3 19:59:31 klotz ppp[765]: tun0: Timer: ---- Begin of Timer Service
 List---
 Jul  3 19:59:31 klotz ppp[765]: tun0: Timer: physical throughput
 timer[0x80be068]: freq = 1.00s, next = 0.00s, state = running
 Jul  3 19:59:31 klotz ppp[765]: tun0: Timer: ---- End of Timer Service
 List ---
 Jul  3 19:59:31 klotz ppp[765]: tun0: Timer: timer_Start: Inserting
 physical throughput timer[0x80be068]
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase: deflink: Disconnected!
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase: deflink: carrier -> hangup
 Jul  3 19:59:31 klotz ppp[765]: tun0: Debug: deflink: Close
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase: deflink: Connect time: 5
 secs: 0 octets in, 0 octets out
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase: deflink: 0 packets in, 0
 packets out
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase:  total 0 bytes/sec, peak 0
 bytes/sec on Sat Jul  3 19:59:26 2004
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase: deflink: hangup -> opening
 Jul  3 19:59:31 klotz ppp[765]: tun0: Timer: timer_Start: Inserting dial
 timer[0x80bcd44]
 Jul  3 19:59:31 klotz ppp[765]: tun0: Phase: deflink: Enter pause (30)
 for redialing.
 --------------------------------------------
 
 - tcpdump.log ------------------------------
 tcpdump: listening on xl0, link-type EN10MB (Ethernet), capture size 96
 bytes
 02:51:05.025723 PPPoE PADI [Host-Uniq 0xC0039AC1]
         0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 .......`.NB;.c..
         0x0010:  0000 000c 0103 0004 c003 9ac1 0101 0000 
 ................
 02:51:07.021481 PPPoE PADI [Host-Uniq 0xC0039AC1]
         0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 .......`.NB;.c..
         0x0010:  0000 000c 0103 0004 c003 9ac1 0101 0000 
 ................
 02:51:40.094078 PPPoE PADI [Host-Uniq 0x40FE81C1]
         0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 .......`.NB;.c..
         0x0010:  0000 000c 0103 0004 40fe 81c1 0101 0000 
 ........@.......
 02:51:42.088841 PPPoE PADI [Host-Uniq 0x40FE81C1]
         0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 .......`.NB;.c..
         0x0010:  0000 000c 0103 0004 40fe 81c1 0101 0000 
 ........@.......
 
 4 packets captured
 4 packets received by filter
 0 packets dropped by kernel
 --------------------------------------------
 
 > - can you show output of `ident /boot/kernel/ng_{pppoe,socket,ether}.ko'
 /boot/kernel/ng_pppoe.ko:
 ident warning: no id keywords in /boot/kernel/ng_pppoe.ko
 /boot/kernel/ng_socket.ko:
 ident warning: no id keywords in /boot/kernel/ng_socket.ko
 /boot/kernel/ng_ether.ko:
 ident warning: no id keywords in /boot/kernel/ng_ether.ko
 
 I hope this helps,
 Martin
 
 

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Martin <nakal@web.de>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Fri, 16 Jul 2004 10:39:29 +0400

 On Fri, Jul 16, 2004 at 01:10:24AM +0000, Martin wrote:
 M>  > - can you confirm that you have rebuilt and installed all modules when
 M>  >   building a new kernel?
 M>  
 M>  I'm always erasing /usr/obj before rebuilding world and kernel.
 M>  Is it correct?
 
 It is. Can you ensure that you do not have NO_MODULES or MODULES_WITH_WORLD
 set in /etc/make.conf?
 Please check also that modification time of your kernel and modules is the same.
 
 M>  tcpdump: listening on xl0, link-type EN10MB (Ethernet), capture size 96
 M>  bytes
 M>  02:51:05.025723 PPPoE PADI [Host-Uniq 0xC0039AC1]
 M>          0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 M>  .......`.NB;.c..
 M>          0x0010:  0000 000c 0103 0004 c003 9ac1 0101 0000 
 M>  ................
 M>  02:51:07.021481 PPPoE PADI [Host-Uniq 0xC0039AC1]
 M>          0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 M>  .......`.NB;.c..
 M>          0x0010:  0000 000c 0103 0004 c003 9ac1 0101 0000 
 M>  ................
 M>  02:51:40.094078 PPPoE PADI [Host-Uniq 0x40FE81C1]
 M>          0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 M>  .......`.NB;.c..
 M>          0x0010:  0000 000c 0103 0004 40fe 81c1 0101 0000 
 M>  ........@.......
 M>  02:51:42.088841 PPPoE PADI [Host-Uniq 0x40FE81C1]
 M>          0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 M>  .......`.NB;.c..
 M>          0x0010:  0000 000c 0103 0004 40fe 81c1 0101 0000 
 M>  ........@.......
 
 Hmm, this is strange. Remember, you said:
 
 M> The ppp logs show me connects and immediate disconnects without sending any PPPoE frames.
 
 Seems like PADI packets are really transmitted, and we don't receive any answer...
 Can you provide me with tcpdump output running old kernel, when it successfully
 logs in?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Martin <nakal@web.de>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Fri, 16 Jul 2004 20:20:49 +0200

 Am Fr, den 16.07.2004 schrieb Gleb Smirnoff um 8:39:
 
 > It is. Can you ensure that you do not have NO_MODULES or MODULES_WITH_WORLD
 > set in /etc/make.conf?
 
 I don't have such options set. The only switch is:
 CFLAGS= -O -pipe
 
 > Please check also that modification time of your kernel and modules is the same.
 
 They are same. The gap between kernel build and modules is
 normal (slow PC). I have built the kernel only ONE time yesterday.
 
 -r-xr-xr-x  1 root  wheel  4792964 15 Jul 23:39 kernel
 -r-xr-xr-x  1 root  wheel    38427 16 Jul 00:09 if_xl.ko
 -r-xr-xr-x  1 root  wheel    26736 16 Jul 00:08 ng_pppoe.ko
 -r-xr-xr-x  1 root  wheel    19930 16 Jul 00:08 ng_socket.ko
 
 
 > Hmm, this is strange. Remember, you said:
 > 
 > M> The ppp logs show me connects and immediate disconnects without sending any PPPoE frames.
 
 Oh. I ment something else. Maybe wrong technical term. Usually you
 see something like this in the ppp.log (verbose):
 Jul  3 20:16:59 klotz ppp[860]: tun0: Physical: read
 and later some data dumped.
 
 There is no such entry in my -CURRENT logs.
 
 > Seems like PADI packets are really transmitted, and we don't receive any answer...
 > Can you provide me with tcpdump output running old kernel, when it successfully
 > logs in?
 
 20:07:22.966820 PPPoE PADI [Host-Uniq 0x008922C3]
         0x0000:  ffff ffff ffff 0060 084e 423b 8863 1109 
 .......`.NB;.c..
         0x0010:  0000 000c 0103 0004 0089 22c3 0101 0000 
 ..........".....
 20:07:23.157031 PPPoE PADO [AC-Name "DTMX12-erx"] [Host-Uniq 0x008922C3]
 [Service-Name] [AC-Cookie 0xE84E9443EDEF5F27616770924AC703D3]
         0x0000:  0060 084e 423b 0090 1a10 10c5 8863 1107 
 .`.NB;.......c..
         0x0010:  0000 002e 0102 000a 4454 4d58 3132 2d65 
 ........DTMX12-e
         0x0020:  7278 0103 0004 0089 22c3 0101 0000 0104 
 rx......".......
         0x0030:  0010 e84e 9443 edef 5f27 6167 7092 4ac7 
 ...N.C.._'agp.J.
         0x0040:  03d3                                     ..
 20:07:23.157145 PPPoE PADR [Host-Uniq 0x008922C3] [AC-Cookie
 0xE84E9443EDEF5F27616770924AC703D3] [AC-Name "DTMX12-erx"]
         0x0000:  0090 1a10 10c5 0060 084e 423b 8863 1119 
 .......`.NB;.c..
         0x0010:  0000 002e 0103 0004 0089 22c3 0104 0010 
 ..........".....
         0x0020:  e84e 9443 edef 5f27 6167 7092 4ac7 03d3 
 .N.C.._'agp.J...
         0x0030:  0102 000a 4454 4d58 3132 2d65 7278 0101 
 ....DTMX12-erx..
         0x0040:  0000                                     ..
 20:07:23.479768 PPPoE PADS [ses 0x18e3] [Service-Name] [Host-Uniq
 0x008922C3] [AC-Name "DTMX12-erx"] [AC-Cookie
 0xE84E9443EDEF5F27616770924AC703D3]
         0x0000:  0060 084e 423b 0090 1a10 10c5 8863 1165 
 .`.NB;.......c.e
         0x0010:  18e3 002e 0101 0000 0103 0004 0089 22c3 
 ..............".
         0x0020:  0102 000a 4454 4d58 3132 2d65 7278 0104 
 ....DTMX12-erx..
         0x0030:  0010 e84e 9443 edef 5f27 6167 7092 4ac7 
 ...N.C.._'agp.J.
         0x0040:  03d3                                     ..
 20:07:24.518286 PPPoE  [ses 0x18e3] LCP, Conf-Request (0x01), id 107,
 MRU  1492, Auth-Prot  PAP, Magic-Num  0x678e2803, length 18
         0x0000:  c021 016b 0012 0104 05d4 0304 c023 0506
         0x0010:  678e 2803
         0x0000:  0060 084e 423b 0090 1a10 10c5 8864 1100 
 .`.NB;.......d..
         0x0010:  18e3 0014 c021 016b 0012 0104 05d4 0304 
 .....!.k........
         0x0020:  c023 0506 678e 2803 0000 0000 0000 0000 
 .#..g.(.........
         0x0030:  0000 0000 0000 0000 0000 0000            ............
 20:07:24.519832 PPPoE  [ses 0x18e3] LCP, Conf-Request (0x01), id 1, ACFC
 , PFC , ACCM  00000000, MRU  1492, Magic-Num  0xc64b8a40, length 24
         0x0000:  c021 0101 0018 0802 0702 0206 0000 0000
         0x0010:  0104 05d4 0506 c64b 8a40
         0x0000:  0090 1a10 10c5 0060 084e 423b 8864 1100 
 .......`.NB;.d..
         0x0010:  18e3 001a c021 0101 0018 0802 0702 0206 
 .....!..........
         0x0020:  0000 0000 0104 05d4 0506 c64b 8a40       ...........K.@
 20:07:24.521483 PPPoE  [ses 0x18e3] LCP, Conf-Ack (0x02), id 107, MRU 
 1492, Auth-Prot  PAP, Magic-Num  0x678e2803, length 18
         0x0000:  c021 026b 0012 0104 05d4 0304 c023 0506
         0x0010:  678e 2803
         0x0000:  0090 1a10 10c5 0060 084e 423b 8864 1100 
 .......`.NB;.d..
         0x0010:  18e3 0014 c021 026b 0012 0104 05d4 0304 
 .....!.k........
         0x0020:  c023 0506 678e 2803                      .#..g.(.
 20:07:24.578533 PPPoE  [ses 0x18e3] LCP, Conf-Ack (0x02), id 1, ACFC ,
 PFC , ACCM  00000000, MRU  1492, Magic-Num  0xc64b8a40, length 24
         0x0000:  c021 0201 0018 0802 0702 0206 0000 0000
         0x0010:  0104 05d4 0506 c64b 8a40
         0x0000:  0060 084e 423b 0090 1a10 10c5 8864 1100 
 .`.NB;.......d..
         0x0010:  18e3 001a c021 0201 0018 0802 0702 0206 
 .....!..........
         0x0020:  0000 0000 0104 05d4 0506 c64b 8a40 0000 
 ...........K.@..
         0x0030:  0000 0000 0000 0000 0000 0000            ............
 
 Then I can see auth-req, auth-ack and later IPCP conf-request.
 
 And then tcpdump dumps core, but I'm connected
 successfully.
 gdb stack:
 #17 0x28289aa6 in vfprintf () from /lib/libc.so.5
 Previous frame inner to this frame (corrupt stack?)
 
 Martin
 
 

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Martin <nakal@web.de>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Fri, 16 Jul 2004 23:34:36 +0400

   Martin,
 
   according to bpf PPPoE PADI packets are emitted by interface.
 But either they do not appear on wire, or PADO relies are not
 entering interface correctly. This is a lower layer than
 PPPoE driver.
 
 Since 2004/05/18 a lot of significant changes were made to xl(4)
 driver. Can I ask you to try an another network card?
 Or try to back out if_xl.c to rev 1.173 and rebuild if_xl.ko?
 
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Martin <nakal@web.de>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Sat, 17 Jul 2004 00:38:26 +0200

 Am Fr, den 16.07.2004 schrieb Gleb Smirnoff um 21:34:
 
 >   according to bpf PPPoE PADI packets are emitted by interface.
 > But either they do not appear on wire, or PADO relies are not
 > entering interface correctly. This is a lower layer than
 > PPPoE driver.
 > 
 > Since 2004/05/18 a lot of significant changes were made to xl(4)
 > driver. Can I ask you to try an another network card?
 
 OK. I have a Realtek NIC (rl driver) now and PPPoE works fine.
 
 I think it might be useful to reopen this PR as a xl-driver
 specific problem, but I will leave it up to you right now.
 
 Thanks for the hint.
 
 Martin
 
 

From: "Matthias Andree" <matthias.andree@web.de>
To: freebsd-gnats-submit@freebsd.org, nakal@web.de
Cc:  
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Wed, 21 Jul 2004 13:09:38 +0200

 I'm also seeing the problem (Deutsche Telekom T-DSL, 3Com905 xl(4) card),
 and I've observed that the xl1 interface is "orphaned" in ngctl show.
 
 rp-pppoe works for me though.
 
 -- 
 Matthias Andree

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Matthias Andree <matthias.andree@web.de>
Cc: freebsd-gnats-submit@FreeBSD.org, nakal@web.de
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Wed, 21 Jul 2004 15:16:46 +0400

 On Wed, Jul 21, 2004 at 11:10:21AM +0000, Matthias Andree wrote:
 M>  I'm also seeing the problem (Deutsche Telekom T-DSL, 3Com905 xl(4) card),
 M>  and I've observed that the xl1 interface is "orphaned" in ngctl show.
 
 Can you try older different revisions of if_xl.c, to find out which
 ones broke PPPoE?
 
 M>  rp-pppoe works for me though.
 
 You mean rp-pppoe on Linux?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Matthias Andree <matthias.andree@gmx.de>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: Matthias Andree <matthias.andree@web.de>,
	freebsd-gnats-submit@FreeBSD.org, nakal@web.de
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Wed, 21 Jul 2004 14:42:13 +0200

 On Wed, 21 Jul 2004, Gleb Smirnoff wrote:
 
 > On Wed, Jul 21, 2004 at 11:10:21AM +0000, Matthias Andree wrote:
 > M>  I'm also seeing the problem (Deutsche Telekom T-DSL, 3Com905 xl(4) card),
 > M>  and I've observed that the xl1 interface is "orphaned" in ngctl show.
 > 
 > Can you try older different revisions of if_xl.c, to find out which
 > ones broke PPPoE?
 
 Will do so later.
 
 I have already tested some configurations with a current kernel.
 
 Hardware:
 xl1: 3Com905
 vr0: Asus A7V600-X onboard VIA Rhine-III
 
 FAIL: FreeBSD ppp, set device PPPoE:xl1, connected to Siemens ADSL modem
       (does not see PADO packets return)
 
 GOOD: FreeBSD ppp, set device PPPoE:vr0, connected to Siemens ADSL modem
       (does not see PADO packets return)
 
 GOOD: FreeBSD ppp, set device "!/usr/local/sbin/pppoe -U -I xl1",
       connected to Siemens ADSL modem
 
 GOOD: FreeBSD ppp, set device PPPoE:xl1, connected to a SuSE Linux 9.1
       machine with rp-pppoe in server mode.
 
 What perplexes me a bit is that the xl1 card works when I replace the
 ADSL modem by a computer with rp-pppoe. The difference is that the modem
 talks 10BaseT in half-duplex but the other computer talks 100BaseTx-Full
 Duplex.
 
 > M>  rp-pppoe works for me though.
 > 
 > You mean rp-pppoe on Linux?
 
 No, I don't, but instead I have revived rp-pppoe in the FreeBSD ports
 collection as a workaround for my problem.
 
 -- 
 Matthias Andree
 
 Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)

From: "Matthias Andree" <matthias.andree@web.de>
To: freebsd-gnats-submit@freebsd.org, nakal@web.de
Cc: glebius@freebsd.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Fri, 23 Jul 2004 13:28:42 +0200

 I believe I've reasonable narrowed the problem down to report back.
 
 Short story:
 "ifconfig xl1 media 10baseT/UTP" (i. e. defeating autoselect/autonegotiate  
 on FreeBSD)
 solves the ppp problem for me with the current if_xl.c.
 
 Long story:
 1. if_xl.c 1.170 and 1.173 do not work
 
 2. if_xl.c 1.169 and older do not compile on -CURRENT and are untested
 
 3. after "ifconfig xl1 media 10baseT/UTP", ppp works again with current  
 if_xl.c
     after "ifconfig xl1 media auto", ppp doesn't work
 
 4. I have played a bit with a crossover cable to a Linux machine and found  
 this:
 When FreeBSD is in autonegotiate mode but the peer is not, packets don't  
 make it out even if settings match.
 
 In the next paragraph, "works" means "peer sees FreeBSD's outgoing packets"
 FreeBSD and Linux forced to "10baseT, half duplex, no autonegotiate" works.
 Any FreeBSD force speed without autonegotiate with Linux autonegotate  
 works.
 FreeBSD autonegotiate with Linux no-autonegotiate DOES NOT work.
 
 This explains the failure with T-DSL, the Siemens Modem I have is fixed to
 10baseT half duplex without auto negotiate.
 
 WTH does FreeBSD's "autoselect" media setting on xl(4) have to do with  
 whether
 outgoing packets are put on the wire or not? Is this an xl(4) or a  
 ng_pppoe(4) bug?
 
 At any rate, FTR: ifconfig_xl1="media 10baseT/UTP up" in rc.conf fixes  
 this.
 
 -- 
 Matthias Andree

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Martin <nakal@web.de>,
	Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Tue, 7 Sep 2004 23:04:50 +0400

 --W/nzBZO5zC0uMSeA
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: inline
 
   Martin, Matthias,
 
   can you try out this patch and report back?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
 
 --W/nzBZO5zC0uMSeA
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: attachment; filename="if_xl.c.diff"
 
 Index: if_xl.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/pci/if_xl.c,v
 retrieving revision 1.179
 diff -u -r1.179 if_xl.c
 --- if_xl.c	6 Aug 2004 09:08:33 -0000	1.179
 +++ if_xl.c	7 Sep 2004 17:29:25 -0000
 @@ -3033,8 +3033,9 @@
  				CSR_WRITE_2(sc, XL_COMMAND,
  				    XL_CMD_RX_SET_FILT|rxfilt);
  				XL_SEL_WIN(7);
 -			} else {
 -				xl_init_locked(sc);
 +			} else
 +				if ((ifp->if_flags & IFF_RUNNING) == 0) {
 +					xl_init_locked(sc);
  			}
  		} else {
  			if (ifp->if_flags & IFF_RUNNING)
 
 --W/nzBZO5zC0uMSeA--

From: Martin <nakal@web.de>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: Matthias Andree <ma@dt.e-technik.uni-dortmund.de>,
	freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Wed, 08 Sep 2004 19:46:18 +0200

 Looks fine for me. PPPoE with T-Online works.
 The logs are OK, too.
 
 I have applied your patch on yesterday's:
 FreeBSD 5.3-BETA3 #0: Wed Sep  8 18:33:17 CEST 2004
 
 Martin
 
 

From: "Matthias Andree" <matthias.andree@web.de>
To: freebsd-gnats-submit@freebsd.org, nakal@web.de,
	glebius@freebsd.org
Cc:  
Subject: Re: kern/69133: PPPoE broken in -CURRENT
Date: Thu, 09 Sep 2004 01:05:47 +0200

 The patch fixes my PPPoE problem. Thank you!
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Thu Sep 9 12:17:39 GMT 2004 
State-Changed-Why:  
Patch applied to CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69133 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Tue Oct 5 12:57:01 GMT 2004 
State-Changed-Why:  
Patch MFCed to RELENG_5. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69133 
>Unformatted:
