DCCP protocol discussions
 help / color / mirror / Atom feed
* [PATCH 1/5]: Sequence number wrap-around when sending reset
@ 2007-09-12 14:35 Gerrit Renker
  2007-09-13  0:06 ` Ian McDonald
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Renker @ 2007-09-12 14:35 UTC (permalink / raw)
  To: dccp

[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 <gerrit@erg.abdn.ac.uk>
---
 net/dccp/ipv4.c |    2 +-
 net/dccp/ipv6.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -554,7 +554,7 @@ static void dccp_v4_ctl_send_reset(struc
 
 	/* 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);
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -336,7 +336,7 @@ static void dccp_v6_ctl_send_reset(struc
 
 	/* 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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-13  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-12 14:35 [PATCH 1/5]: Sequence number wrap-around when sending reset Gerrit Renker
2007-09-13  0:06 ` Ian McDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox