Commit dbb1db8b authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a429c49
...@@ -66,6 +66,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err) ...@@ -66,6 +66,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
if (unlikely(x->replay.oseq == 0)) { if (unlikely(x->replay.oseq == 0)) {
x->replay.oseq--; x->replay.oseq--;
xfrm_audit_state_replay_overflow(x, skb); xfrm_audit_state_replay_overflow(x, skb);
err = -EOVERFLOW;
goto error; goto error;
} }
if (xfrm_aevent_is_on()) if (xfrm_aevent_is_on())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment