aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMitsuru Chinen <mitch@linux.vnet.ibm.com>2007-12-07 04:07:24 -0500
committerDavid S. Miller <davem@davemloft.net>2007-12-07 04:07:24 -0500
commit7f53878dc2618bf7c01e2135bd271ac01bd85dc9 (patch)
tree9a0f0d7dcb2aba668f423b2f5392ab5ec290ec8f /net
parentca46f9c834913fc5d5c196d70673375cdaba6b56 (diff)
[IPv4]: Reply net unreachable ICMP message
IPv4 stack doesn't reply any ICMP destination unreachable message with net unreachable code when IP detagrams are being discarded because of no route could be found in the forwarding path. Incidentally, IPv6 stack replies such ICMPv6 message in the similar situation. Signed-off-by: Mitsuru Chinen <mitch@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/route.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index c426dec6d579..79c4b9360a12 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1252,6 +1252,7 @@ static int ip_error(struct sk_buff *skb)
1252 break; 1252 break;
1253 case ENETUNREACH: 1253 case ENETUNREACH:
1254 code = ICMP_NET_UNREACH; 1254 code = ICMP_NET_UNREACH;
1255 IP_INC_STATS_BH(IPSTATS_MIB_INNOROUTES);
1255 break; 1256 break;
1256 case EACCES: 1257 case EACCES:
1257 code = ICMP_PKT_FILTERED; 1258 code = ICMP_PKT_FILTERED;
@@ -1881,6 +1882,8 @@ no_route:
1881 RT_CACHE_STAT_INC(in_no_route); 1882 RT_CACHE_STAT_INC(in_no_route);
1882 spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); 1883 spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE);
1883 res.type = RTN_UNREACHABLE; 1884 res.type = RTN_UNREACHABLE;
1885 if (err == -ESRCH)
1886 err = -ENETUNREACH;
1884 goto local_input; 1887 goto local_input;
1885 1888
1886 /* 1889 /*