diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:30:19 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:45:32 -0400 |
commit | 51c7d4fa2675c106a980ddcdbe308b54b5151945 (patch) | |
tree | 0c1f2b1a3323582fb8629ba7826e08710271ed49 /net/dccp/minisocks.c | |
parent | 09856c108956c99088ead9267ccbd1dab77f7043 (diff) |
dccp: Implement both feature-local and feature-remote Sequence Window feature
This adds full support for local/remote Sequence Window feature, from which the
* sequence-number-validity (W) and
* acknowledgment-number-validity (W') windows
derive as specified in RFC 4340, 7.5.3.
Specifically, the following changes are introduced:
* integrated new socket fields into dccp_sk;
* updated the update_gsr/gss routines with regard to these fields;
* updated handler code: the Sequence Window feature is located at the TX side,
so the local feature is meant if the handler-rx flag is false;
* the initialisation of `rcv_wnd' in reqsk is removed, since
- rcv_wnd is not used by the code anywhere;
- sequence number checks are not done in the LISTEN state (cf. 7.5.3);
- dccp_check_req checks the Ack number validity more rigorously;
* the `struct dccp_minisock' became empty and is now removed.
Until the handshake completes with activating negotiated values, the local/remote
Sequence-Window values are undefined and thus can not reliably be estimated.
This issue is addressed in a separate patch.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r-- | net/dccp/minisocks.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 0ebf8ebcf3de..0ecb19c5e8ce 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -42,11 +42,6 @@ struct inet_timewait_death_row dccp_death_row = { | |||
42 | 42 | ||
43 | EXPORT_SYMBOL_GPL(dccp_death_row); | 43 | EXPORT_SYMBOL_GPL(dccp_death_row); |
44 | 44 | ||
45 | void dccp_minisock_init(struct dccp_minisock *dmsk) | ||
46 | { | ||
47 | dmsk->dccpms_sequence_window = sysctl_dccp_feat_sequence_window; | ||
48 | } | ||
49 | |||
50 | void dccp_time_wait(struct sock *sk, int state, int timeo) | 45 | void dccp_time_wait(struct sock *sk, int state, int timeo) |
51 | { | 46 | { |
52 | struct inet_timewait_sock *tw = NULL; | 47 | struct inet_timewait_sock *tw = NULL; |
@@ -110,7 +105,6 @@ struct sock *dccp_create_openreq_child(struct sock *sk, | |||
110 | struct dccp_request_sock *dreq = dccp_rsk(req); | 105 | struct dccp_request_sock *dreq = dccp_rsk(req); |
111 | struct inet_connection_sock *newicsk = inet_csk(newsk); | 106 | struct inet_connection_sock *newicsk = inet_csk(newsk); |
112 | struct dccp_sock *newdp = dccp_sk(newsk); | 107 | struct dccp_sock *newdp = dccp_sk(newsk); |
113 | struct dccp_minisock *newdmsk = dccp_msk(newsk); | ||
114 | 108 | ||
115 | newdp->dccps_role = DCCP_ROLE_SERVER; | 109 | newdp->dccps_role = DCCP_ROLE_SERVER; |
116 | newdp->dccps_hc_rx_ackvec = NULL; | 110 | newdp->dccps_hc_rx_ackvec = NULL; |
@@ -128,10 +122,6 @@ struct sock *dccp_create_openreq_child(struct sock *sk, | |||
128 | * Initialize S.GAR := S.ISS | 122 | * Initialize S.GAR := S.ISS |
129 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookies | 123 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookies |
130 | */ | 124 | */ |
131 | |||
132 | /* See dccp_v4_conn_request */ | ||
133 | newdmsk->dccpms_sequence_window = req->rcv_wnd; | ||
134 | |||
135 | newdp->dccps_gar = newdp->dccps_iss = dreq->dreq_iss; | 125 | newdp->dccps_gar = newdp->dccps_iss = dreq->dreq_iss; |
136 | dccp_update_gss(newsk, dreq->dreq_iss); | 126 | dccp_update_gss(newsk, dreq->dreq_iss); |
137 | 127 | ||
@@ -289,7 +279,6 @@ int dccp_reqsk_init(struct request_sock *req, | |||
289 | 279 | ||
290 | inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport; | 280 | inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport; |
291 | inet_rsk(req)->acked = 0; | 281 | inet_rsk(req)->acked = 0; |
292 | req->rcv_wnd = sysctl_dccp_feat_sequence_window; | ||
293 | dreq->dreq_timestamp_echo = 0; | 282 | dreq->dreq_timestamp_echo = 0; |
294 | 283 | ||
295 | /* inherit feature negotiation options from listening socket */ | 284 | /* inherit feature negotiation options from listening socket */ |