diff options
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 2cc4f4b2a9dd..1ae2248557c6 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -88,11 +88,9 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
88 | return -EPROTO; | 88 | return -EPROTO; |
89 | } | 89 | } |
90 | 90 | ||
91 | skb->h.raw = skb_push(skb, dccp_header_size); | ||
92 | dh = dccp_hdr(skb); | ||
93 | 91 | ||
94 | /* Build DCCP header and checksum it. */ | 92 | /* Build DCCP header and checksum it. */ |
95 | memset(dh, 0, dccp_header_size); | 93 | dh = dccp_zeroed_hdr(skb, dccp_header_size); |
96 | dh->dccph_type = dcb->dccpd_type; | 94 | dh->dccph_type = dcb->dccpd_type; |
97 | dh->dccph_sport = inet->sport; | 95 | dh->dccph_sport = inet->sport; |
98 | dh->dccph_dport = inet->dport; | 96 | dh->dccph_dport = inet->dport; |
@@ -340,10 +338,7 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst, | |||
340 | return NULL; | 338 | return NULL; |
341 | } | 339 | } |
342 | 340 | ||
343 | skb->h.raw = skb_push(skb, dccp_header_size); | 341 | dh = dccp_zeroed_hdr(skb, dccp_header_size); |
344 | |||
345 | dh = dccp_hdr(skb); | ||
346 | memset(dh, 0, dccp_header_size); | ||
347 | 342 | ||
348 | dh->dccph_sport = inet_sk(sk)->sport; | 343 | dh->dccph_sport = inet_sk(sk)->sport; |
349 | dh->dccph_dport = inet_rsk(req)->rmt_port; | 344 | dh->dccph_dport = inet_rsk(req)->rmt_port; |
@@ -392,10 +387,7 @@ static struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst, | |||
392 | return NULL; | 387 | return NULL; |
393 | } | 388 | } |
394 | 389 | ||
395 | skb->h.raw = skb_push(skb, dccp_header_size); | 390 | dh = dccp_zeroed_hdr(skb, dccp_header_size); |
396 | |||
397 | dh = dccp_hdr(skb); | ||
398 | memset(dh, 0, dccp_header_size); | ||
399 | 391 | ||
400 | dh->dccph_sport = inet_sk(sk)->sport; | 392 | dh->dccph_sport = inet_sk(sk)->sport; |
401 | dh->dccph_dport = inet_sk(sk)->dport; | 393 | dh->dccph_dport = inet_sk(sk)->dport; |