Commit 9bf55cda authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[DCCP]: Sequence number wrap-around when sending reset

This replaces normal addition with mod-48 addition so that sequence number
wraparound is respected.
Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
parent a94f0f97
...@@ -552,7 +552,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) ...@@ -552,7 +552,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
/* See "8.3.1. Abnormal Termination" in RFC 4340 */ /* See "8.3.1. Abnormal Termination" in RFC 4340 */
if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1); seqno = ADD48(DCCP_SKB_CB(rxskb)->dccpd_ack_seq, 1);
dccp_hdr_set_seq(dh, seqno); dccp_hdr_set_seq(dh, seqno);
dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq); dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq);
......
...@@ -336,7 +336,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) ...@@ -336,7 +336,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
/* See "8.3.1. Abnormal Termination" in RFC 4340 */ /* See "8.3.1. Abnormal Termination" in RFC 4340 */
if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1); seqno = ADD48(DCCP_SKB_CB(rxskb)->dccpd_ack_seq, 1);
dccp_hdr_set_seq(dh, seqno); dccp_hdr_set_seq(dh, seqno);
dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq); dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq);
......
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