From owner-freebsd-current Fri Jul 7 10:30:44 2000 Delivered-To: freebsd-current@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id 873BC37C209 for ; Fri, 7 Jul 2000 10:30:37 -0700 (PDT) (envelope-from julian@elischer.org) Received: from casablanca-60.budapest.interware.hu ([195.70.53.60] helo=jules.elischer.org) by mail.interware.hu with smtp (Exim 3.12 #1 (Debian)) id 13Abx0-0005MF-00; Fri, 07 Jul 2000 19:30:07 +0200 Message-ID: <39661392.41C67EA6@elischer.org> Date: Fri, 07 Jul 2000 10:29:54 -0700 From: Julian Elischer X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 5.0-CURRENT i386) MIME-Version: 1.0 To: Archie Cobbs Cc: Daniel Berlin , Brian Somers , Daniel Berlin , freebsd-current@FreeBSD.ORG Subject: Re: PPPoE not working References: <200007070001.RAA14545@bubba.whistle.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Archie Cobbs wrote: > > Julian Elischer writes: > > > > The code's in ppp/ether.c. > > > > > > > > I'll see if I can get time to figure out what's wrong, but I can't > > > > promise anything this week. I'm too busy (we're having a FreeBSD > > > > mini-conference here in the UK at which I'm speaking...). > > > > > > > I already solved this one, the problem is that the source address is being overwritten with 0's. > > > As a temporary hack, if you go into ng_pppoe.c, and replace the 0's with your ethernet address, you'll be golden. > > > > Actually Archie left out code to add IN the source MAC address. > > so it wasn;t being overwritten, it was never being set.... > > > > I just committed a fix. > > let me know the result > > Julian, > Thanks for the fix. However, this seems like the wrong fix to me. > It was a quick replication of the original code.. the right answer is to have a hook that does this, and another that does not. The ppp code and in fact any code higher than the ethernet layer is the wrong place to do this because the source address is "out of scope" anwhere higher. At least that is my thought. I think that whenever code needs to manipulate data to which it really shouldn't have access to, we end up regretting it, and the code becomes overly complicated. > I think the right fix would be for ppp(8) to set the source address, > rather than always forcing it in ng_ether.c... that way the "lower" > hook really is WYSIWYG and applications where other source addresses > may want to be used are possible. In effect, some ethernet cards add in the source address themselves, overwriting whatever is there. (e.g. intel 82586). I think there should be a WYSIWYG hook. > > I thought the semantics of writing to "lower" or "orphans" were to > be that the packet gets delivered out the link exactly "as-is", > unchanged. Having the correct source address should be optional. No, becasue the hardware may clobber the source address. I theory you are right, but then the source address needs to be available to other nodes. > > Perhaps there could be a control message to set an "add source > address" bit. While we're at it, we could also use a control message > to get the unique Ethernet address, turn promiscuous mode on/off, > and add multicast addresses. The ng_ether routines have promiscuous knowledge of the ethernet specification and routines, so they could do all these things.. > > What do you guys think? I want to see the scope of the information preserved. Anything that works within correct scope or officially exports the information needed is ok. > > -Archie > > ___________________________________________________________________________ > Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 )_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message