Skip to content

Commit b15c4bc

Browse files
Masahide NAKAMURAdavem330
authored andcommitted
[XFRM]: Fix outbound statistics.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 426b530 commit b15c4bc

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎net/xfrm/xfrm_output.c‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,23 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
4343

4444
do {
4545
err = xfrm_state_check_space(x, skb);
46-
if (err)
46+
if (err) {
47+
XFRM_INC_STATS(LINUX_MIB_XFRMOUTERROR);
4748
goto error_nolock;
49+
}
4850

4951
err = x->outer_mode->output(x, skb);
50-
if (err)
52+
if (err) {
53+
XFRM_INC_STATS(LINUX_MIB_XFRMOUTSTATEMODEERROR);
5154
goto error_nolock;
55+
}
5256

5357
spin_lock_bh(&x->lock);
5458
err = xfrm_state_check_expire(x);
55-
if (err)
59+
if (err) {
60+
XFRM_INC_STATS(LINUX_MIB_XFRMOUTSTATEEXPIRED);
5661
goto error;
62+
}
5763

5864
if (x->type->flags & XFRM_TYPE_REPLAY_PROT) {
5965
XFRM_SKB_CB(skb)->seq = ++x->replay.oseq;

0 commit comments

Comments
 (0)