浏览代码

[IPSEC]: Return EOVERFLOW when output sequence number overflows

Previously we made it an error on the output path if the sequence number
overflowed.  However we did not set the err variable accordingly.  This
patch sets err to -EOVERFLOW in that case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu 17 年之前
父节点
当前提交
dbb1db8b59
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/xfrm/xfrm_output.c

+ 1 - 0
net/xfrm/xfrm_output.c

@@ -66,6 +66,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
 			if (unlikely(x->replay.oseq == 0)) {
 				x->replay.oseq--;
 				xfrm_audit_state_replay_overflow(x, skb);
+				err = -EOVERFLOW;
 				goto error;
 			}
 			if (xfrm_aevent_is_on())