aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_input.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-26 19:27:09 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-26 19:27:09 -0400
commit251da4130115b29403a57096fa0988249f31fc55 (patch)
tree8bc64a855cc330048989d30c0082c838e70a9d29 /net/ipv4/ip_input.c
parentdf67e6c9a6ca59ca96bdd46a500ae9dd596f427c (diff)
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.c8
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)
342 err = ip_route_input_noref(skb, iph->daddr, iph->saddr, 342 err = ip_route_input_noref(skb, iph->daddr, iph->saddr,
343 iph->tos, skb->dev); 343 iph->tos, skb->dev);
344 if (unlikely(err)) { 344 if (unlikely(err)) {
345 if (err == -EHOSTUNREACH) 345 if (err == -EXDEV)
346 IP_INC_STATS_BH(dev_net(skb->dev),
347 IPSTATS_MIB_INADDRERRORS);
348 else if (err == -ENETUNREACH)
349 IP_INC_STATS_BH(dev_net(skb->dev),
350 IPSTATS_MIB_INNOROUTES);
351 else if (err == -EXDEV)
352 NET_INC_STATS_BH(dev_net(skb->dev), 346 NET_INC_STATS_BH(dev_net(skb->dev),
353 LINUX_MIB_IPRPFILTER); 347 LINUX_MIB_IPRPFILTER);
354 goto drop; 348 goto drop;