aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-12-06 00:38:06 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-06 12:51:40 -0500
commit15c77d8b3be5a7f451035e6487127f58e5f872fa (patch)
tree5be3b65935efaca6c7b024276b2dbb38b95c400e /net/ipv6/ip6_output.c
parent22781a5b9cd8aa58908eec8e269643559335f455 (diff)
ipv6: consistent use of IP6_INC_STATS_BH() in ip6_forward()
ip6_forward() runs from softirq context, we can use the SNMP macros assuming this. Use same indentation for all IP6_INC_STATS_BH() calls. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4acdb63495db..9a311cc79672 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -336,7 +336,8 @@ int ip6_forward(struct sk_buff *skb)
336 goto drop; 336 goto drop;
337 337
338 if (!xfrm6_policy_check(NULL, XFRM_POLICY_FWD, skb)) { 338 if (!xfrm6_policy_check(NULL, XFRM_POLICY_FWD, skb)) {
339 IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_INDISCARDS); 339 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
340 IPSTATS_MIB_INDISCARDS);
340 goto drop; 341 goto drop;
341 } 342 }
342 343
@@ -370,8 +371,8 @@ int ip6_forward(struct sk_buff *skb)
370 /* Force OUTPUT device used as source address */ 371 /* Force OUTPUT device used as source address */
371 skb->dev = dst->dev; 372 skb->dev = dst->dev;
372 icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 0); 373 icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 0);
373 IP6_INC_STATS_BH(net, 374 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
374 ip6_dst_idev(dst), IPSTATS_MIB_INHDRERRORS); 375 IPSTATS_MIB_INHDRERRORS);
375 376
376 kfree_skb(skb); 377 kfree_skb(skb);
377 return -ETIMEDOUT; 378 return -ETIMEDOUT;
@@ -384,14 +385,15 @@ int ip6_forward(struct sk_buff *skb)
384 if (proxied > 0) 385 if (proxied > 0)
385 return ip6_input(skb); 386 return ip6_input(skb);
386 else if (proxied < 0) { 387 else if (proxied < 0) {
387 IP6_INC_STATS(net, ip6_dst_idev(dst), 388 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
388 IPSTATS_MIB_INDISCARDS); 389 IPSTATS_MIB_INDISCARDS);
389 goto drop; 390 goto drop;
390 } 391 }
391 } 392 }
392 393
393 if (!xfrm6_route_forward(skb)) { 394 if (!xfrm6_route_forward(skb)) {
394 IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_INDISCARDS); 395 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
396 IPSTATS_MIB_INDISCARDS);
395 goto drop; 397 goto drop;
396 } 398 }
397 dst = skb_dst(skb); 399 dst = skb_dst(skb);
@@ -448,16 +450,17 @@ int ip6_forward(struct sk_buff *skb)
448 /* Again, force OUTPUT device used as source address */ 450 /* Again, force OUTPUT device used as source address */
449 skb->dev = dst->dev; 451 skb->dev = dst->dev;
450 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); 452 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
451 IP6_INC_STATS_BH(net, 453 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
452 ip6_dst_idev(dst), IPSTATS_MIB_INTOOBIGERRORS); 454 IPSTATS_MIB_INTOOBIGERRORS);
453 IP6_INC_STATS_BH(net, 455 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
454 ip6_dst_idev(dst), IPSTATS_MIB_FRAGFAILS); 456 IPSTATS_MIB_FRAGFAILS);
455 kfree_skb(skb); 457 kfree_skb(skb);
456 return -EMSGSIZE; 458 return -EMSGSIZE;
457 } 459 }
458 460
459 if (skb_cow(skb, dst->dev->hard_header_len)) { 461 if (skb_cow(skb, dst->dev->hard_header_len)) {
460 IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTDISCARDS); 462 IP6_INC_STATS_BH(net, ip6_dst_idev(dst),
463 IPSTATS_MIB_OUTDISCARDS);
461 goto drop; 464 goto drop;
462 } 465 }
463 466