diff options
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index c40f7f8a328b..95a3c2c6a3ce 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -134,12 +134,13 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
134 | 134 | ||
135 | unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) | 135 | unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) |
136 | { | 136 | { |
137 | struct inet_connection_sock *icsk = inet_csk(sk); | ||
137 | struct dccp_sock *dp = dccp_sk(sk); | 138 | struct dccp_sock *dp = dccp_sk(sk); |
138 | int mss_now = (pmtu - inet_csk(sk)->icsk_af_ops->net_header_len - | 139 | int mss_now = (pmtu - icsk->icsk_af_ops->net_header_len - |
139 | sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext)); | 140 | sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext)); |
140 | 141 | ||
141 | /* Now subtract optional transport overhead */ | 142 | /* Now subtract optional transport overhead */ |
142 | mss_now -= dp->dccps_ext_header_len; | 143 | mss_now -= icsk->icsk_ext_hdr_len; |
143 | 144 | ||
144 | /* | 145 | /* |
145 | * FIXME: this should come from the CCID infrastructure, where, say, | 146 | * FIXME: this should come from the CCID infrastructure, where, say, |
@@ -152,7 +153,7 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) | |||
152 | mss_now -= ((5 + 6 + 10 + 6 + 6 + 6 + 3) / 4) * 4; | 153 | mss_now -= ((5 + 6 + 10 + 6 + 6 + 6 + 3) / 4) * 4; |
153 | 154 | ||
154 | /* And store cached results */ | 155 | /* And store cached results */ |
155 | dp->dccps_pmtu_cookie = pmtu; | 156 | icsk->icsk_pmtu_cookie = pmtu; |
156 | dp->dccps_mss_cache = mss_now; | 157 | dp->dccps_mss_cache = mss_now; |
157 | 158 | ||
158 | return mss_now; | 159 | return mss_now; |