summaryrefslogtreecommitdiffstats
path: root/net/dccp/dccp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-21 10:36:45 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-30 01:03:42 +0200
commit03ace394ac9bcad38043a381ae5f4860b9c9fa1c (patch)
treebbe5f7fc56074224ded47113974dbc3db550b303 /net/dccp/dccp.h
parent[DCCP]: Give more info on Step 6 failure debug printk (diff)
downloadlinux-03ace394ac9bcad38043a381ae5f4860b9c9fa1c.tar.xz
linux-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.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,
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);