diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-21 04:33:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:03:25 -0400 |
commit | 2807d4ffb0dccb8f932c3e1701b6b6163153d333 (patch) | |
tree | 77379d35e53a7c531e78659e8244652b8c6635d5 /net/dccp | |
parent | c68e64cfb5ac675b002215b5659146b73d2e9d5d (diff) |
[DCCP]: Fix seqno setting in dccp_v4_ctl_send_reset
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index cc5d60d9afa4..02ebf1f39f38 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -887,6 +887,7 @@ static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb) | |||
887 | sizeof(struct dccp_hdr_reset); | 887 | sizeof(struct dccp_hdr_reset); |
888 | struct sk_buff *skb; | 888 | struct sk_buff *skb; |
889 | struct dst_entry *dst; | 889 | struct dst_entry *dst; |
890 | u64 seqno; | ||
890 | 891 | ||
891 | /* Never send a reset in response to a reset. */ | 892 | /* Never send a reset in response to a reset. */ |
892 | if (rxdh->dccph_type == DCCP_PKT_RESET) | 893 | if (rxdh->dccph_type == DCCP_PKT_RESET) |
@@ -920,7 +921,12 @@ static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb) | |||
920 | dccp_hdr_reset(skb)->dccph_reset_code = | 921 | dccp_hdr_reset(skb)->dccph_reset_code = |
921 | DCCP_SKB_CB(rxskb)->dccpd_reset_code; | 922 | DCCP_SKB_CB(rxskb)->dccpd_reset_code; |
922 | 923 | ||
923 | dccp_hdr_set_seq(dh, DCCP_SKB_CB(rxskb)->dccpd_ack_seq); | 924 | /* See "8.3.1. Abnormal Termination" in draft-ietf-dccp-spec-11 */ |
925 | seqno = 0; | ||
926 | if (DCCP_SKB_CB(rxskb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) | ||
927 | dccp_set_seqno(&seqno, DCCP_SKB_CB(rxskb)->dccpd_ack_seq + 1); | ||
928 | |||
929 | dccp_hdr_set_seq(dh, seqno); | ||
924 | dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), | 930 | dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), |
925 | DCCP_SKB_CB(rxskb)->dccpd_seq); | 931 | DCCP_SKB_CB(rxskb)->dccpd_seq); |
926 | 932 | ||