[XFRM]: Fix outbound statistics.
authorMasahide NAKAMURA <nakam@linux-ipv6.org>
Tue, 25 Dec 2007 00:00:09 +0000 (16:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:00:04 +0000 (15:00 -0800)
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_output.c

index d73003cb2c0e51478710366866b7f1904ec8da95..c1ba63efd7cbcf3a786050b2c9bc01ff818690ea 100644 (file)
@@ -43,17 +43,23 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
 
        do {
                err = xfrm_state_check_space(x, skb);
-               if (err)
+               if (err) {
+                       XFRM_INC_STATS(LINUX_MIB_XFRMOUTERROR);
                        goto error_nolock;
+               }
 
                err = x->outer_mode->output(x, skb);
-               if (err)
+               if (err) {
+                       XFRM_INC_STATS(LINUX_MIB_XFRMOUTSTATEMODEERROR);
                        goto error_nolock;
+               }
 
                spin_lock_bh(&x->lock);
                err = xfrm_state_check_expire(x);
-               if (err)
+               if (err) {
+                       XFRM_INC_STATS(LINUX_MIB_XFRMOUTSTATEEXPIRED);
                        goto error;
+               }
 
                if (x->type->flags & XFRM_TYPE_REPLAY_PROT) {
                        XFRM_SKB_CB(skb)->seq = ++x->replay.oseq;