[2052] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: ICMP redirects do not show up in /proc/net/route?

daemon@ATHENA.MIT.EDU (really kuznet@ms2.inr.ac.ru)
Tue Mar 12 18:11:29 1996

From: inr-linux-net@ms2.inr.ac.ru (really kuznet@ms2.inr.ac.ru)
To: linux-net@vger.rutgers.edu
Date: 	11 Mar 1996 18:23:48 +0300

Miquel van Smoorenburg (miquels@cistron.NL) wrote:
: Hi all,

:   I just spend some time on a tool with which I can generate ICMP
: redirects at will. I found out a problem: I sent a ICMP redirect
: to one of our machines (picard), and it worked. However the route
: does not show up in /proc/net/route, and I cannot delete it with
: route del ... The only solution was to send another ICMP redirect message
: to reset things :)

/proc/net/route shows the contents of FIB (forwarding information base),
that is object driven by a local authority (by gated, by routed or
by hands of system administrator).

ICMP redirects are not recorded in FIB, they are recorded 
only in "host route cache".
If you want to monitor them, look at /proc/net/rt_cache.
(it has the format of /proc/net/route except for
"netmask" field, that replaced by "source address";
I believe, the corresponding extensions for route and netstat -r tools 
will appear in the future versions of net-tools.)
All its entries are temporary and they are flushed
every time when FIB is modified. Besides that, they will be
timed out for RT_CACHE_TIMEOUT = 5min.

You cannot delete it with route del. Really, you do not want
to delete it, because even if you managed to delete it,
you would receive the same redirect again.

Really, the only control, that should be added to the current code is
"rt cache flush". It is missing now, so that make
	route add -host 1.2.3.4 lo
	route del 1.2.3.4 
to delete undesirable redirects.

Alexey Kuznetsov.


home help back first fref pref prev next nref lref last post