diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-11-24 18:42:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:54:54 -0500 |
commit | e18d7a9857cb620a8f70622c4e400be477c264cf (patch) | |
tree | b09b5040a1885ba2f5287fb3d0a9e05e6abc33c5 /net/dccp/proto.c | |
parent | d50ad163e6db2dcc365b8d02b30350220f86df04 (diff) |
[DCCP]: Initialize dccp_sock before calling the ccid constructors
This is because in the next patch CCID2 will assume that dccps_mss_cache is
non-zero.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 0aec73592124..d48005f653c7 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -174,6 +174,19 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | |||
174 | 174 | ||
175 | dccp_minisock_init(&dp->dccps_minisock); | 175 | dccp_minisock_init(&dp->dccps_minisock); |
176 | 176 | ||
177 | icsk->icsk_rto = DCCP_TIMEOUT_INIT; | ||
178 | icsk->icsk_syn_retries = sysctl_dccp_request_retries; | ||
179 | sk->sk_state = DCCP_CLOSED; | ||
180 | sk->sk_write_space = dccp_write_space; | ||
181 | icsk->icsk_sync_mss = dccp_sync_mss; | ||
182 | dp->dccps_mss_cache = 536; | ||
183 | dp->dccps_rate_last = jiffies; | ||
184 | dp->dccps_role = DCCP_ROLE_UNDEFINED; | ||
185 | dp->dccps_service = DCCP_SERVICE_CODE_IS_ABSENT; | ||
186 | dp->dccps_l_ack_ratio = dp->dccps_r_ack_ratio = 1; | ||
187 | |||
188 | dccp_init_xmit_timers(sk); | ||
189 | |||
177 | /* | 190 | /* |
178 | * FIXME: We're hardcoding the CCID, and doing this at this point makes | 191 | * FIXME: We're hardcoding the CCID, and doing this at this point makes |
179 | * the listening (master) sock get CCID control blocks, which is not | 192 | * the listening (master) sock get CCID control blocks, which is not |
@@ -213,18 +226,6 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | |||
213 | INIT_LIST_HEAD(&dmsk->dccpms_conf); | 226 | INIT_LIST_HEAD(&dmsk->dccpms_conf); |
214 | } | 227 | } |
215 | 228 | ||
216 | dccp_init_xmit_timers(sk); | ||
217 | icsk->icsk_rto = DCCP_TIMEOUT_INIT; | ||
218 | icsk->icsk_syn_retries = sysctl_dccp_request_retries; | ||
219 | sk->sk_state = DCCP_CLOSED; | ||
220 | sk->sk_write_space = dccp_write_space; | ||
221 | icsk->icsk_sync_mss = dccp_sync_mss; | ||
222 | dp->dccps_mss_cache = 536; | ||
223 | dp->dccps_rate_last = jiffies; | ||
224 | dp->dccps_role = DCCP_ROLE_UNDEFINED; | ||
225 | dp->dccps_service = DCCP_SERVICE_CODE_IS_ABSENT; | ||
226 | dp->dccps_l_ack_ratio = dp->dccps_r_ack_ratio = 1; | ||
227 | |||
228 | return 0; | 229 | return 0; |
229 | } | 230 | } |
230 | 231 | ||