aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r--net/dccp/output.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 74ff87025878..f35880503bb8 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -43,6 +43,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
43{ 43{
44 if (likely(skb != NULL)) { 44 if (likely(skb != NULL)) {
45 const struct inet_sock *inet = inet_sk(sk); 45 const struct inet_sock *inet = inet_sk(sk);
46 const struct inet_connection_sock *icsk = inet_csk(sk);
46 struct dccp_sock *dp = dccp_sk(sk); 47 struct dccp_sock *dp = dccp_sk(sk);
47 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb); 48 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb);
48 struct dccp_hdr *dh; 49 struct dccp_hdr *dh;
@@ -108,8 +109,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
108 break; 109 break;
109 } 110 }
110 111
111 dh->dccph_checksum = dccp_v4_checksum(skb, inet->saddr, 112 icsk->icsk_af_ops->send_check(sk, skb->len, skb);
112 inet->daddr);
113 113
114 if (set_ack) 114 if (set_ack)
115 dccp_event_ack_sent(sk); 115 dccp_event_ack_sent(sk);
@@ -117,7 +117,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
117 DCCP_INC_STATS(DCCP_MIB_OUTSEGS); 117 DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
118 118
119 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 119 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
120 err = ip_queue_xmit(skb, 0); 120 err = icsk->icsk_af_ops->queue_xmit(skb, 0);
121 if (err <= 0) 121 if (err <= 0)
122 return err; 122 return err;
123 123
@@ -135,16 +135,14 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
135unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) 135unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu)
136{ 136{
137 struct dccp_sock *dp = dccp_sk(sk); 137 struct dccp_sock *dp = dccp_sk(sk);
138 int mss_now;
139
140 /* 138 /*
141 * FIXME: we really should be using the af_specific thing to support 139 * FIXME: we really should be using the af_specific thing to support
142 * IPv6. 140 * IPv6.
143 * mss_now = pmtu - tp->af_specific->net_header_len - 141 * mss_now = pmtu - tp->af_specific->net_header_len -
144 * sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext); 142 * sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext);
145 */ 143 */
146 mss_now = pmtu - sizeof(struct iphdr) - sizeof(struct dccp_hdr) - 144 int mss_now = (pmtu - inet_csk(sk)->icsk_af_ops->net_header_len -
147 sizeof(struct dccp_hdr_ext); 145 sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext));
148 146
149 /* Now subtract optional transport overhead */ 147 /* Now subtract optional transport overhead */
150 mss_now -= dp->dccps_ext_header_len; 148 mss_now -= dp->dccps_ext_header_len;
@@ -266,7 +264,7 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo)
266 264
267int dccp_retransmit_skb(struct sock *sk, struct sk_buff *skb) 265int dccp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
268{ 266{
269 if (inet_sk_rebuild_header(sk) != 0) 267 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk) != 0)
270 return -EHOSTUNREACH; /* Routing failure or similar. */ 268 return -EHOSTUNREACH; /* Routing failure or similar. */
271 269
272 return dccp_transmit_skb(sk, (skb_cloned(skb) ? 270 return dccp_transmit_skb(sk, (skb_cloned(skb) ?