Subject: kern/20203: wrong ethertype for PPPOE_TERM_UNKNOWN_SESSIONS
To: None <gnats-bugs@gnats.netbsd.org>
From: Shoichi Miyake <smi@sm.sony.co.jp>
List: netbsd-bugs
Date: 02/04/2003 22:31:41
>Number: 20203
>Category: kern
>Synopsis: wrong ethertype for PPPOE_TERM_UNKNOWN_SESSIONS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 04 05:32:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Shoichi Miyake
>Release: NetBSD 1.6M
>Organization:
Sony Corporation
>Environment:
System: NetBSD skysensor 1.6M NetBSD 1.6M (SKYSENSOR) #1: Wed Jan 29 09:21:27 UTC 2003 smi@skysensor:/work/nb/src/sys/arch/i386/compile/SKYSENSOR i386
Architecture: i386
Machine: i386
>Description:
With PPPOE_TERM_UNKNOWN_SESSIONS, when pppoe interface tries to send
PADT packet, its ether header type is incorrect, so that PADT cannnot
terminate the pppoe session.
I think ETHERTYPE_PPPOEDISC is correct.
>How-To-Repeat:
Configure kernel with PPPOE_TERM_UNKNOWN_SESSIONS.
Connect to a ISP with pppoe0, reset the PC, and try to re-establish
new pppoe connection.
>Fix:
Index: net/if_pppoe.c
===================================================================
RCS file: /work/cvs/sirius/base/src/sys/net/if_pppoe.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -c -r1.8 -r1.9
cvs server: conflicting specifications of output style
*** net/if_pppoe.c 2002/11/25 09:04:44 1.8
--- net/if_pppoe.c 2002/11/25 13:28:22 1.9
***************
*** 657,663 ****
memset(&dst, 0, sizeof dst);
dst.sa_family = AF_UNSPEC;
eh = (struct ether_header*)&dst.sa_data;
! eh->ether_type = htons(ETHERTYPE_PPPOE);
memcpy(&eh->ether_dhost, shost, ETHER_ADDR_LEN);
m0->m_flags &= ~(M_BCAST|M_MCAST);
--- 657,663 ----
memset(&dst, 0, sizeof dst);
dst.sa_family = AF_UNSPEC;
eh = (struct ether_header*)&dst.sa_data;
! eh->ether_type = htons(ETHERTYPE_PPPOEDISC);
memcpy(&eh->ether_dhost, shost, ETHER_ADDR_LEN);
m0->m_flags &= ~(M_BCAST|M_MCAST);
>Release-Note:
>Audit-Trail:
>Unformatted: