* [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
* Re: [PATCH] [IPv4] Add strict check for replying net unreachable message
2007-12-07 4:24 [PATCH] [IPv4] Add strict check for replying net unreachable message Mitsuru Chinen
@ 2007-12-07 6:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-12-07 6:41 UTC (permalink / raw)
To: mitch; +Cc: netdev, roszenrami, jarkao2
From: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Date: Fri, 7 Dec 2007 13:24:18 +0900
> 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>
Applied, thanks.
I'll probably combine this with your original change before I
push these changes upstream.
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).