From guest@vinil.tenet.res.in  Fri Jun 11 11:10:41 2004
Return-Path: <guest@vinil.tenet.res.in>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3D9EA16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Jun 2004 11:10:41 +0000 (GMT)
Received: from vinil.tenet.res.in (satyam-gate.tenet.res.in [202.144.28.162])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BAA2D43D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Jun 2004 11:10:37 +0000 (GMT)
	(envelope-from guest@vinil.tenet.res.in)
Received: from vinil.tenet.res.in (localhost.tenet.res.in [127.0.0.1])
	by vinil.tenet.res.in (8.12.10/8.12.10) with ESMTP id i5BBAxFY022358
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Jun 2004 16:40:59 +0530 (IST)
	(envelope-from guest@vinil.tenet.res.in)
Received: (from root@localhost)
	by vinil.tenet.res.in (8.12.10/8.12.10/Submit) id i5BBAxaP022355;
	Fri, 11 Jun 2004 16:40:59 +0530 (IST)
	(envelope-from guest)
Message-Id: <200406111110.i5BBAxaP022355@vinil.tenet.res.in>
Date: Fri, 11 Jun 2004 16:40:59 +0530 (IST)
From: Girish Venkatachalam <girish1729@yahoo.com>
Reply-To: Girish Venkatachalam <girish1729@yahoo.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: PPPoE doesn't work when Relay session ID is sent in PADO
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         67825
>Category:       kern
>Synopsis:       PPPoE doesn't work when Relay session ID is sent in PADO
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 11 11:20:24 GMT 2004
>Closed-Date:    Fri Jun 11 12:08:17 GMT 2004
>Last-Modified:  Fri Jun 11 12:08:17 GMT 2004
>Originator:     Girish Venkatachalam
>Release:        FreeBSD 5.2.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD vinil.tenet.res.in 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Tue May 11 17:08:23 IST 2004 root@vinil.tenet.res.in:/usr/src/sys/i386/compile/DEVIKERNEL i386

 The #define for RELAY SESSION ID parameter is wrong in ng_pppoe.h because of which my home FreeBSD machine wouldn't connect to my ISP in India. This is because if the RELAY SESSION ID given by PADO packet is not echoed in PADR packet a PADS packet is never sent by the server and my machine attemps reconnection in a loop. 

I am attaching the patch which fixed the problem for me as well as the section in RFC 2516 which gives the value for RELAY SESSION ID. 

Please apply the patch as quickly as possible since the problem almost drove me nuts for nearly two days. 

Here is the patch

<<<<<<<<<<<<<<<<<


--- ng_pppoe.h	Fri Jun 11 16:26:33 2004
+++ ng_pppoe.h.new	Fri Jun 11 16:24:13 2004
@@ -166,7 +166,7 @@
 #define PTT_HOST_UNIQ	(0x0103)
 #define PTT_AC_COOKIE	(0x0104)
 #define PTT_VENDOR 	(0x0105)
-#define PTT_RELAY_SID	(0x0106)
+#define PTT_RELAY_SID	(0x0110)
 #define PTT_SRV_ERR     (0x0201)
 #define PTT_SYS_ERR  	(0x0202)
 #define PTT_GEN_ERR  	(0x0203)
@@ -182,7 +182,7 @@
 #define PTT_HOST_UNIQ	(0x0301)
 #define PTT_AC_COOKIE	(0x0401)
 #define PTT_VENDOR 	(0x0501)
-#define PTT_RELAY_SID	(0x0601)
+#define PTT_RELAY_SID	(0x1001)
 #define PTT_SRV_ERR     (0x0102)
 #define PTT_SYS_ERR  	(0x0202)
 #define PTT_GEN_ERR  	(0x0302)

<<<<<<<<<<<<<

And here is the section from the RFC for the value of RELAY SESSION ID

0x0110 Relay-Session-Id

      This TAG MAY be added to any discovery packet by an intermediate
      agent that is relaying traffic.  The TAG_VALUE is opaque to both
      the Host and the Access Concentrator.  If either the Host or
      Access Concentrator receives this TAG they MUST include it
      unmodified in any discovery packet they send as a response.  All
      PADI packets MUST guarantee sufficient room for the addition of a
      Relay-Session-Id TAG with a TAG_VALUE length of 12 octets.

      A Relay-Session-Id TAG MUST NOT be added if the discovery packet
      already contains one.  In that case the intermediate agent SHOULD
      use the existing Relay-Session-Id TAG.  If it can not use the
      existing TAG or there is insufficient room to add a Relay-
      Session-Id TAG, then it SHOULD return a Generic-Error TAG to the
      sender.

-Girish
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Jun 11 12:07:28 GMT 2004 
State-Changed-Why:  
o Duplicate of kern/44936. 
o Already fixed in rev. 1.19 sys/netgraph/ng_pppoe.h and MFCed to -STABLE. 

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