Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jul 2001 13:11:48 +0300 (EEST)
From:      Iasen Kostoff <tbyte@tbyte.org>
To:        Ruslan Ermilov <ru@FreeBSD.ORG>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: adding a route to host via interface
Message-ID:  <Pine.BSF.4.21.0107041250490.38065-100000@shadow.otel.net>
In-Reply-To: <20010703181032.A65571@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107041250490.38065-100000>