The patch `Reply net unreachable ICMP message' had a bug.
A route whose type is blockhole or prohibit type is treated as
unreachable type. The case where err is set to ENETUNREACH should
be that no route is found in the routing table only.

Signed-off-by: Mitsuru Chinen <[EMAIL PROTECTED]>
---
 net/ipv4/route.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 8a79f74..d2bc614 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1882,7 +1882,8 @@ no_route:
        RT_CACHE_STAT_INC(in_no_route);
        spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE);
        res.type = RTN_UNREACHABLE;
-       err = -ENETUNREACH;
+       if (err == -ESRCH)
+               err = -ENETUNREACH;
        goto local_input;
 
        /*
-- 
1.5.3.4

--
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