From owner-freebsd-net Wed Aug 1 15:43:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 77C8337B401; Wed, 1 Aug 2001 15:43:48 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.4/8.11.4) with ESMTP id f71Mhjs05940; Wed, 1 Aug 2001 23:43:46 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.4/8.11.4) with ESMTP id f71Mhi809898; Wed, 1 Aug 2001 23:43:44 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200108012243.f71Mhi809898@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Julian Elischer Cc: Thomas Pornin , freebsd-net@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG, Brian Somers , FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/27767: (was: PPPoE + Alpha + 32/64 bits) In-Reply-To: Message from Julian Elischer of "Wed, 01 Aug 2001 13:01:12 PDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 01 Aug 2001 23:43:44 +0100 From: Brian Somers Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I think the attached will fix it properly -- but I haven't got an alpha to test with, so can someone do the honours for me ? Ta. > can you send us a patch that works for you? > we can make it #ifdef __Alpha__ or something. > > can you ocnfirm that the outgoing packet has a tag-lenth of '8' > and that teh return tag has a length of '4'? > (maybe 9 and 5) > > sounds like a brain-dead router at the other end.. > > > On Wed, 1 Aug 2001, Thomas Pornin wrote: > > > Hello, > > > > I recently connected my FreeBSD/Alpha (4.3-RELEASE) to an ADSL link > > using an Alcatel Speed Touch Home modem. As is, it was not working; > > after some digging, I found that there is a bug either in the ng_pppoe > > support, or in the modem. > > > > The problem is in the pppoe_finduniq() function. In order to identify > > sessions, the PPPoE code sends a tag with the first packet it sends to > > the modem; this tag is in fact a 64-bit pointer to some data structure > > in kernel space. When a packet of type PADO_CODE or PADS_CODE is > > received, the tag is compared with known pointers. > > > > However, only 32 bits are present in the return tag. So, if the original > > pointer is 0xfffffc00003b3d00, the tag contains only 0x003b3d00, which > > are the first four bytes of data (in little-endian representation). If > > I modify the pppoe_finduniq() function to accept matches on these four > > bytes, the connection is established, and remains fully functionnal > > afterwards. > > > > Some details: The Alpha is little-endian, but the data in the packets is > > big-endian. If the original pointer is 0xfffffc00003b3d00, the rebuilt > > tag from the response packet is actually 0x003b3d0000000000. I do not > > know if the 8-bytes tag is sent correctly, or if the modem is buggy, or > > whatever. > > > > Machine configuration: > > AXPpci33 at 166 MHz, 32 MB ram > > ethernet PCI adapter RealTek 8029 10baseT (ed0) > > modem Alcatel Speed Touch Home (ethernet) > > FreeBSD 4.3-RELEASE (with a small patch to enable ed0) > > > > Feel free to ask for any detail. > > > > > > --Thomas Pornin -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! Index: ng_pppoe.c =================================================================== RCS file: /home/ncvs/src/sys/netgraph/ng_pppoe.c,v retrieving revision 1.45 diff -u -r1.45 ng_pppoe.c --- ng_pppoe.c 2001/07/25 03:34:07 1.45 +++ ng_pppoe.c 2001/08/01 22:40:15 @@ -868,7 +868,7 @@ struct { struct pppoe_tag hdr; union uniq data; - } uniqtag; + } __attribute ((packed)) uniqtag; /* * kick the state machine into starting up @@ -910,7 +910,7 @@ struct { struct pppoe_tag hdr; union uniq data; - } uniqtag; + } __attribute ((packed)) uniqtag; negp neg = NULL; struct mbuf *m; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message