Date: Wed, 21 Mar 2001 10:41:54 -0700 From: Wes Peters <wes@softweyr.com> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: Garrett Wollman <wollman@FreeBSD.org>, net@FreeBSD.org Subject: Re: Indirect routes with indirect gateways, bugfix Message-ID: <3AB8E7E2.36F360AA@softweyr.com> References: <20010321133611.A62997@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov wrote:
>
> Hi!
>
> The routing code (bogusly?) allows to add an indirect route with
> also indirect gateway. This results in some nasty bugs:
>
> : Script started on Wed Mar 21 13:17:47 2001
> :
> : freebsd# netstat -rn
> : Routing tables
> :
> : Internet:
> : Destination Gateway Flags Refs Use Netif Expire
> : 127.0.0.1 127.0.0.1 UH 0 0 lo0
> : 192.168.1 link#1 UC 0 0 rl0 =>
> :
> : freebsd# route add -net 10 1.2.3.4
> : route: writing to routing socket: Network is unreachable
> : add net 10: gateway 1.2.3.4: Network is unreachable
> :
> : freebsd# route add default 192.168.1.1
> : add net default: gateway 192.168.1.1
> :
> : freebsd# route add -net 10 1.2.3.4
> : add net 10: gateway 1.2.3.4
> :
> : freebsd# ping -c1 10.0.0.1
> : PING 10.0.0.1 (10.0.0.1): 56 data bytes
> :
> : --- 10.0.0.1 ping statistics ---
> : 1 packets transmitted, 0 packets received, 100% packet loss
> :
> : freebsd# dmesg | tail -2
> : arplookup 1.2.3.4 failed: host is not on local network
> : arpresolve: can't allocate llinfo for 1.2.3.4rt
> : freebsd#
> :
> : Script done on Wed Mar 21 13:19:00 2001
>
> I have searched the CSRG SCCS logs, and found that the relevant code
> was added in route.c, version 7.22 (well, 7.22 is actually a part of
> 7.23 that went into Net/2 release). I have marked the relevant text
> from the commit log with circumflexes:
>
> [...]
>
> Unless someone has a good motivation for not doing this, I am going
> to commit the attached patch that disallows indirect routes with
> indirect gateways.
This allows a crude sort of "policy routing", if that is of any value.
I don't see what it hurts, or any reason to remove it. A misconfigured
routing table is a system administration problem, not a code problem.
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC
wes@softweyr.com http://softweyr.com/
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?3AB8E7E2.36F360AA>
