Hello,

Suppose a routing cache entry is added as a consequence of
a redirect to host ICMP message.

There is in include/linux.h two flags , one for entry which
is created and one for an entry which is modified because of a redirect:

#define RTF_DYNAMIC     0x0010          /* created dyn. (by redirect) */
#define RTF_MODIFIED    0x0020          /* modified dyn. (by redirect)

Let's talk about the first case , creation of an entry as a result of redirect.
(RTF_DYNAMIC).

I saw that  the RTF_DYNAMIC flag is used only in ipv6 (in
net/ipv6/route.c, in rt6_redirect() method.

MY question is : why is this flag not set in ipv4 redirect method  ?
(ip_rt_redirect() in route.c).

As far as I understand, because this flag is **not** set in ipv4, there is no
way to know that a route was changed by a redirect (not in the route cache
and not in the routing table (fib_table).

The reason for this is, that from "man route" you can see that the
flags possible when redirect occurs are:
ute for dynamic routing)
             D (dynamically installed by daemon or redirect)
             M (modified from routing daemon or redirect)

D corresponds to RTF_DYNAMIC and M corresponds to RTF_MODIFIED.

I know that many machines are not accepting redirects by default
from reasons of security. Yet it seems to me stange, that as a result of
what was explained above, there is no way to know in ipv4 that a route was
changed as a result of host redirect (yet it is possible as far as I understand
to know it in ipv6).

Any explanations/clarifications?

Regards,
IB
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to