Add strict check for replying net unreachable message
Subsystems (3)
PATCH 1/1 Add strict check for replying net unreachable message
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(-)
net/ipv4/route.c +2 -1
@@ -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;/*
Signature · 1 line
1.5.3.4
From: Mitsuru Chinen <[email protected]>
Date: Fri, 7 Dec 2007 13:24:18 +0900
Quoted 6 lines
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]>
Applied, thanks.
I'll probably combine this with your original change before I push these changes upstream.