From owner-freebsd-net Wed Jul 4 3:11:54 2001 Delivered-To: freebsd-net@freebsd.org Received: from shadow.otel.net (JuDiCaToR.OTEL.net [212.36.9.113]) by hub.freebsd.org (Postfix) with ESMTP id 34A7B37B406; Wed, 4 Jul 2001 03:11:50 -0700 (PDT) (envelope-from tbyte@tbyte.org) Received: from localhost (localhost [127.0.0.1]) by shadow.otel.net (8.11.4/8.11.1) with ESMTP id f64ABmK38102; Wed, 4 Jul 2001 13:11:48 +0300 (EEST) (envelope-from tbyte@tbyte.org) Date: Wed, 4 Jul 2001 13:11:48 +0300 (EEST) From: Iasen Kostoff X-Sender: tbyte@shadow.otel.net To: Ruslan Ermilov Cc: freebsd-net@FreeBSD.ORG Subject: Re: adding a route to host via interface In-Reply-To: <20010703181032.A65571@sunbay.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Tue, 3 Jul 2001, Ruslan Ermilov wrote: > On Tue, Jul 03, 2001 at 04:54:29PM +0300, Iasen Kostoff wrote: > > > [...] > > > You can't change host route to network route, or vise versa; destination > > > is the Patricia's tree key, and it can't be changed. The only possible > > > way is like I suggested: ``route add foo/32 -iface bar -cloning''. > > > > Yes I know, but ``route add foo -iface bar -cloning`` is meanless, I > > think, because host route could not be cloned and I kernel should auto set > > foo to foo/32 because of meanlessness of -host foo. > > > Could you please try the attached patch? It disallows cloning for > host entries. > I test it , it works fine. > > And is route add -host > > foo -iface bar (without -cloning) could be used for something ? > > > Yes, it is currently used for proxy ARP type 1 entries: > > # arp -s 192.168.4.200 1:2:3:4:5:6 pub > # netstat -rn | grep 192.168.4.200 > 192.168.4.200/32 1:2:3:4:5:6 ULS2c 0 0 rl0 > > The purpose of /32 here is to allow the call to rtalloc1() in arplookup() > to match this route even if the SIN_PROXY flag (proxy ARP type 2; aka > published (proxy only)) is set in the sin_other member of the > sockaddr_inarp structure. > I think -cloning should be the default when you add route like : route add -net foo/32 -iface bar and may be it's better route(8) to set -net route when you try manualy to set route like : route add foo -iface bar (without specifing -llinfo) because this will add route to your own LAN card lladdr which I don't think could be in use for someone (may be I'm wrong). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message