From owner-freebsd-hackers Sun Dec 7 16:18:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA06511 for hackers-outgoing; Sun, 7 Dec 1997 16:18:41 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA06503; Sun, 7 Dec 1997 16:18:29 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id AAA07847; Mon, 8 Dec 1997 00:18:26 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id BAA10105; Mon, 8 Dec 1997 01:17:57 +0100 (MET) To: Brian Somers Cc: freebsd-hackers@FreeBSD.ORG Subject: Route behaviour (was Re: cvs commit: src/usr.sbin/ppp command.c ppp.8 route.c) References: <199712070409.UAA29789@freefall.freebsd.org> From: Eivind Eklund Date: 08 Dec 1997 01:17:56 +0100 In-Reply-To: Brian Somers's message of Sat, 6 Dec 1997 20:09:16 -0800 (PST) Message-ID: <8690twpu17.fsf@bitbox.follo.net> Lines: 36 X-Mailer: Gnus v5.4.52/XEmacs 20.2 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Brian Somers writes: > brian 1997/12/06 20:09:16 PST > > Modified files: > usr.sbin/ppp command.c ppp.8 route.c > Log: > Only allow one arg to `delete' - the mask & gateway aren't necessary. > Delete AF_LINK routes as well as AF_INET. > Allow the word `default' as the arg to `delete' or in place of the > first two args (dest & netmask) to `add'. > Accept INTERFACE as the third arg to `add'. > > You can now say `add default interface' to create a default route > through the tun interface. It's reported that subsequent bind()s > will bind to a broadcast address and not to the address currently > assigned to the tun device - this is the first step towards > supporting that first connection that was around from before the > dynamic IP negotiation.... I've been thinking a bit more about it, and now I consider this binding a bug. With an interface route to an interface with no assigned address, we're actually sending packets onto the network that hasn't got a legit source address. This works for the single case where there is a NAT engine at the other end of that link, but that is also the _only_ case it works for. I'm still a bit uncertain about what would be the best approach - probably binding to another interface in the machine. That's weird too, but probably less surprising never the less What do other people think? Is this feasible given the way routing is implemented in the FreeBSD kernel? Eivind.