diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-27 01:27:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 01:27:09 +0200 |
commit | 251da4130115b29403a57096fa0988249f31fc55 (patch) | |
tree | 8bc64a855cc330048989d30c0082c838e70a9d29 /net/ipv4/ip_input.c | |
parent | ipv4: Remove unnecessary code from rt_check_expire(). (diff) | |
download | linux-251da4130115b29403a57096fa0988249f31fc55.tar.xz linux-251da4130115b29403a57096fa0988249f31fc55.zip |
ipv4: Cache ip_error() routes even when not forwarding.
And account for the fact that, when we are not forwarding, we should
bump statistic counters rather than emit an ICMP response.
RP-filter rejected lookups are still not cached.
Since -EHOSTUNREACH and -ENETUNREACH can now no longer be seen in
ip_rcv_finish(), remove those checks.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r-- | net/ipv4/ip_input.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index bca25179cdb9..2a39204de5bc 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -342,13 +342,7 @@ static int ip_rcv_finish(struct sk_buff *skb) err = ip_route_input_noref(skb, iph->daddr, iph->saddr, iph->tos, skb->dev); if (unlikely(err)) { - if (err == -EHOSTUNREACH) - IP_INC_STATS_BH(dev_net(skb->dev), - IPSTATS_MIB_INADDRERRORS); - else if (err == -ENETUNREACH) - IP_INC_STATS_BH(dev_net(skb->dev), - IPSTATS_MIB_INNOROUTES); - else if (err == -EXDEV) + if (err == -EXDEV) NET_INC_STATS_BH(dev_net(skb->dev), LINUX_MIB_IPRPFILTER); goto drop; |