aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/dccp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-21 04:36:45 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 19:03:42 -0400
commit03ace394ac9bcad38043a381ae5f4860b9c9fa1c (patch)
treebbe5f7fc56074224ded47113974dbc3db550b303 /net/dccp/dccp.h
parenta3054d48b9b9d6290eccc9fc09c286ef450d9b1d (diff)
[DCCP]: Fix the ACK and SEQ window variables settings
This is from a first audit, more eyeballs are more than welcome. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r--net/dccp/dccp.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index aab72b8d0703..33968a9422f2 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -340,13 +340,11 @@ static inline void dccp_hdr_set_ack(struct dccp_hdr_ack_bits *dhack,
340static inline void dccp_update_gsr(struct sock *sk, u64 seq) 340static inline void dccp_update_gsr(struct sock *sk, u64 seq)
341{ 341{
342 struct dccp_sock *dp = dccp_sk(sk); 342 struct dccp_sock *dp = dccp_sk(sk);
343 u64 tmp_gsr;
344 343
345 dccp_set_seqno(&tmp_gsr, 344 dp->dccps_gsr = seq;
345 dccp_set_seqno(&dp->dccps_swl,
346 (dp->dccps_gsr + 1 - 346 (dp->dccps_gsr + 1 -
347 (dp->dccps_options.dccpo_sequence_window / 4))); 347 (dp->dccps_options.dccpo_sequence_window / 4)));
348 dp->dccps_gsr = seq;
349 dccp_set_seqno(&dp->dccps_swl, max48(tmp_gsr, dp->dccps_isr));
350 dccp_set_seqno(&dp->dccps_swh, 348 dccp_set_seqno(&dp->dccps_swh,
351 (dp->dccps_gsr + 349 (dp->dccps_gsr +
352 (3 * dp->dccps_options.dccpo_sequence_window) / 4)); 350 (3 * dp->dccps_options.dccpo_sequence_window) / 4));
@@ -355,13 +353,11 @@ static inline void dccp_update_gsr(struct sock *sk, u64 seq)
355static inline void dccp_update_gss(struct sock *sk, u64 seq) 353static inline void dccp_update_gss(struct sock *sk, u64 seq)
356{ 354{
357 struct dccp_sock *dp = dccp_sk(sk); 355 struct dccp_sock *dp = dccp_sk(sk);
358 u64 tmp_gss;
359 356
360 dccp_set_seqno(&tmp_gss, 357 dp->dccps_awh = dp->dccps_gss = seq;
358 dccp_set_seqno(&dp->dccps_awl,
361 (dp->dccps_gss - 359 (dp->dccps_gss -
362 dp->dccps_options.dccpo_sequence_window + 1)); 360 dp->dccps_options.dccpo_sequence_window + 1));
363 dp->dccps_awl = max48(tmp_gss, dp->dccps_iss);
364 dp->dccps_awh = dp->dccps_gss = seq;
365} 361}
366 362
367extern void dccp_insert_options(struct sock *sk, struct sk_buff *skb); 363extern void dccp_insert_options(struct sock *sk, struct sk_buff *skb);