diff options
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 7098f1055f4a..64b7f8bda42d 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -201,7 +201,7 @@ static void dccp_v4_ctl_send_ack(struct sk_buff *rxskb) | |||
201 | { | 201 | { |
202 | int err; | 202 | int err; |
203 | struct dccp_hdr *rxdh = dccp_hdr(rxskb), *dh; | 203 | struct dccp_hdr *rxdh = dccp_hdr(rxskb), *dh; |
204 | const int dccp_hdr_ack_len = sizeof(struct dccp_hdr) + | 204 | const u32 dccp_hdr_ack_len = sizeof(struct dccp_hdr) + |
205 | sizeof(struct dccp_hdr_ext) + | 205 | sizeof(struct dccp_hdr_ext) + |
206 | sizeof(struct dccp_hdr_ack_bits); | 206 | sizeof(struct dccp_hdr_ack_bits); |
207 | struct sk_buff *skb; | 207 | struct sk_buff *skb; |
@@ -209,12 +209,12 @@ static void dccp_v4_ctl_send_ack(struct sk_buff *rxskb) | |||
209 | if (((struct rtable *)rxskb->dst)->rt_type != RTN_LOCAL) | 209 | if (((struct rtable *)rxskb->dst)->rt_type != RTN_LOCAL) |
210 | return; | 210 | return; |
211 | 211 | ||
212 | skb = alloc_skb(MAX_DCCP_HEADER + 15, GFP_ATOMIC); | 212 | skb = alloc_skb(dccp_v4_ctl_socket->sk->sk_prot->max_header, GFP_ATOMIC); |
213 | if (skb == NULL) | 213 | if (skb == NULL) |
214 | return; | 214 | return; |
215 | 215 | ||
216 | /* Reserve space for headers. */ | 216 | /* Reserve space for headers. */ |
217 | skb_reserve(skb, MAX_DCCP_HEADER); | 217 | skb_reserve(skb, dccp_v4_ctl_socket->sk->sk_prot->max_header); |
218 | 218 | ||
219 | skb->dst = dst_clone(rxskb->dst); | 219 | skb->dst = dst_clone(rxskb->dst); |
220 | 220 | ||
@@ -715,12 +715,13 @@ static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb) | |||
715 | if (dst == NULL) | 715 | if (dst == NULL) |
716 | return; | 716 | return; |
717 | 717 | ||
718 | skb = alloc_skb(MAX_DCCP_HEADER + 15, GFP_ATOMIC); | 718 | skb = alloc_skb(dccp_v4_ctl_socket->sk->sk_prot->max_header, |
719 | GFP_ATOMIC); | ||
719 | if (skb == NULL) | 720 | if (skb == NULL) |
720 | goto out; | 721 | goto out; |
721 | 722 | ||
722 | /* Reserve space for headers. */ | 723 | /* Reserve space for headers. */ |
723 | skb_reserve(skb, MAX_DCCP_HEADER); | 724 | skb_reserve(skb, dccp_v4_ctl_socket->sk->sk_prot->max_header); |
724 | skb->dst = dst_clone(dst); | 725 | skb->dst = dst_clone(dst); |
725 | 726 | ||
726 | skb->h.raw = skb_push(skb, dccp_hdr_reset_len); | 727 | skb->h.raw = skb_push(skb, dccp_hdr_reset_len); |