diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-21 05:36:45 -0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 16:03:42 -0700 |
commit | 03ace394ac9bcad38043a381ae5f4860b9c9fa1c (patch) | |
tree | bbe5f7fc56074224ded47113974dbc3db550b303 /net/dccp/dccp.h | |
parent | a3054d48b9b9d6290eccc9fc09c286ef450d9b1d (diff) | |
download | lwn-03ace394ac9bcad38043a381ae5f4860b9c9fa1c.tar.gz lwn-03ace394ac9bcad38043a381ae5f4860b9c9fa1c.zip |
[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.h | 12 |
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, static inline void dccp_update_gsr(struct sock *sk, u64 seq) { struct dccp_sock *dp = dccp_sk(sk); - u64 tmp_gsr; - dccp_set_seqno(&tmp_gsr, + dp->dccps_gsr = seq; + dccp_set_seqno(&dp->dccps_swl, (dp->dccps_gsr + 1 - (dp->dccps_options.dccpo_sequence_window / 4))); - dp->dccps_gsr = seq; - dccp_set_seqno(&dp->dccps_swl, max48(tmp_gsr, dp->dccps_isr)); dccp_set_seqno(&dp->dccps_swh, (dp->dccps_gsr + (3 * dp->dccps_options.dccpo_sequence_window) / 4)); @@ -355,13 +353,11 @@ static inline void dccp_update_gsr(struct sock *sk, u64 seq) static inline void dccp_update_gss(struct sock *sk, u64 seq) { struct dccp_sock *dp = dccp_sk(sk); - u64 tmp_gss; - dccp_set_seqno(&tmp_gss, + dp->dccps_awh = dp->dccps_gss = seq; + dccp_set_seqno(&dp->dccps_awl, (dp->dccps_gss - dp->dccps_options.dccpo_sequence_window + 1)); - dp->dccps_awl = max48(tmp_gss, dp->dccps_iss); - dp->dccps_awh = dp->dccps_gss = seq; } extern void dccp_insert_options(struct sock *sk, struct sk_buff *skb); |