All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [IPv4] Add strict check for replying net unreachable message
@ 2007-12-07  4:24 Mitsuru Chinen
  2007-12-07  6:41 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Mitsuru Chinen @ 2007-12-07  4:24 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Rami Rosen, Jarek Poplawski

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 <mitch@linux.vnet.ibm.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-07  6:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-07  4:24 [PATCH] [IPv4] Add strict check for replying net unreachable message Mitsuru Chinen
2007-12-07  6:41 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.