From: Gerrit Renker Date: Wed, 26 Sep 2007 14:32:49 +0000 (-0300) Subject: [DCCP]: Sequence number wrap-around when sending reset X-Git-Tag: v2.6.24-rc1~1454^2~349 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9bf55cda9b2487fa7316dad3880acb0031ad3c0f;p=linux-2.6-omap-h63xx.git [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: Gerrit Renker Signed-off-by: Ian McDonald Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 2c628281526..58a79c2ae55 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -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 */ 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_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq); diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index b158c661867..d954e8319db 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -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 */ 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_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq);