aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 671fbf3b2379..c363051a7f16 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -104,9 +104,9 @@ int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
104 inet->dport = usin->sin_port; 104 inet->dport = usin->sin_port;
105 inet->daddr = daddr; 105 inet->daddr = daddr;
106 106
107 dp->dccps_ext_header_len = 0; 107 inet_csk(sk)->icsk_ext_hdr_len = 0;
108 if (inet->opt != NULL) 108 if (inet->opt != NULL)
109 dp->dccps_ext_header_len = inet->opt->optlen; 109 inet_csk(sk)->icsk_ext_hdr_len = inet->opt->optlen;
110 /* 110 /*
111 * Socket identity is still unknown (sport may be zero). 111 * Socket identity is still unknown (sport may be zero).
112 * However we set state to DCCP_REQUESTING and not releasing socket 112 * However we set state to DCCP_REQUESTING and not releasing socket
@@ -191,7 +191,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
191 mtu = dst_mtu(dst); 191 mtu = dst_mtu(dst);
192 192
193 if (inet->pmtudisc != IP_PMTUDISC_DONT && 193 if (inet->pmtudisc != IP_PMTUDISC_DONT &&
194 dp->dccps_pmtu_cookie > mtu) { 194 inet_csk(sk)->icsk_pmtu_cookie > mtu) {
195 dccp_sync_mss(sk, mtu); 195 dccp_sync_mss(sk, mtu);
196 196
197 /* 197 /*
@@ -1051,6 +1051,7 @@ struct inet_connection_sock_af_ops dccp_ipv4_af_ops = {
1051int dccp_v4_init_sock(struct sock *sk) 1051int dccp_v4_init_sock(struct sock *sk)
1052{ 1052{
1053 struct dccp_sock *dp = dccp_sk(sk); 1053 struct dccp_sock *dp = dccp_sk(sk);
1054 struct inet_connection_sock *icsk = inet_csk(sk);
1054 static int dccp_ctl_socket_init = 1; 1055 static int dccp_ctl_socket_init = 1;
1055 1056
1056 dccp_options_init(&dp->dccps_options); 1057 dccp_options_init(&dp->dccps_options);
@@ -1090,10 +1091,11 @@ int dccp_v4_init_sock(struct sock *sk)
1090 dccp_ctl_socket_init = 0; 1091 dccp_ctl_socket_init = 0;
1091 1092
1092 dccp_init_xmit_timers(sk); 1093 dccp_init_xmit_timers(sk);
1093 inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT; 1094 icsk->icsk_rto = DCCP_TIMEOUT_INIT;
1094 sk->sk_state = DCCP_CLOSED; 1095 sk->sk_state = DCCP_CLOSED;
1095 sk->sk_write_space = dccp_write_space; 1096 sk->sk_write_space = dccp_write_space;
1096 inet_csk(sk)->icsk_af_ops = &dccp_ipv4_af_ops; 1097 icsk->icsk_af_ops = &dccp_ipv4_af_ops;
1098 icsk->icsk_sync_mss = dccp_sync_mss;
1097 dp->dccps_mss_cache = 536; 1099 dp->dccps_mss_cache = 536;
1098 dp->dccps_role = DCCP_ROLE_UNDEFINED; 1100 dp->dccps_role = DCCP_ROLE_UNDEFINED;
1099 dp->dccps_service = DCCP_SERVICE_INVALID_VALUE; 1101 dp->dccps_service = DCCP_SERVICE_INVALID_VALUE;