aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ip_output.c7
-rw-r--r--net/ipv6/ip6_output.c8
2 files changed, 9 insertions, 6 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 7c9f9a6421b8..9bf307a29783 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -526,6 +526,8 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
526 526
527 err = output(skb); 527 err = output(skb);
528 528
529 if (!err)
530 IP_INC_STATS(IPSTATS_MIB_FRAGCREATES);
529 if (err || !frag) 531 if (err || !frag)
530 break; 532 break;
531 533
@@ -649,9 +651,6 @@ slow_path:
649 /* 651 /*
650 * Put this fragment into the sending queue. 652 * Put this fragment into the sending queue.
651 */ 653 */
652
653 IP_INC_STATS(IPSTATS_MIB_FRAGCREATES);
654
655 iph->tot_len = htons(len + hlen); 654 iph->tot_len = htons(len + hlen);
656 655
657 ip_send_check(iph); 656 ip_send_check(iph);
@@ -659,6 +658,8 @@ slow_path:
659 err = output(skb2); 658 err = output(skb2);
660 if (err) 659 if (err)
661 goto fail; 660 goto fail;
661
662 IP_INC_STATS(IPSTATS_MIB_FRAGCREATES);
662 } 663 }
663 kfree_skb(skb); 664 kfree_skb(skb);
664 IP_INC_STATS(IPSTATS_MIB_FRAGOKS); 665 IP_INC_STATS(IPSTATS_MIB_FRAGOKS);
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 70c9234b70e7..69451af6abe7 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -596,6 +596,9 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
596 } 596 }
597 597
598 err = output(skb); 598 err = output(skb);
599 if(!err)
600 IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES);
601
599 if (err || !frag) 602 if (err || !frag)
600 break; 603 break;
601 604
@@ -707,12 +710,11 @@ slow_path:
707 /* 710 /*
708 * Put this fragment into the sending queue. 711 * Put this fragment into the sending queue.
709 */ 712 */
710
711 IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES);
712
713 err = output(frag); 713 err = output(frag);
714 if (err) 714 if (err)
715 goto fail; 715 goto fail;
716
717 IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES);
716 } 718 }
717 kfree_skb(skb); 719 kfree_skb(skb);
718 IP6_INC_STATS(IPSTATS_MIB_FRAGOKS); 720 IP6_INC_STATS(IPSTATS_MIB_FRAGOKS);