aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 11d7f753a820..fead049daf43 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -322,7 +322,6 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
322 unsigned int flags) 322 unsigned int flags)
323{ 323{
324 struct inet_sock *inet = inet_sk(sk); 324 struct inet_sock *inet = inet_sk(sk);
325 int hh_len;
326 struct iphdr *iph; 325 struct iphdr *iph;
327 struct sk_buff *skb; 326 struct sk_buff *skb;
328 unsigned int iphlen; 327 unsigned int iphlen;
@@ -336,13 +335,12 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
336 if (flags&MSG_PROBE) 335 if (flags&MSG_PROBE)
337 goto out; 336 goto out;
338 337
339 hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); 338 skb = sock_alloc_send_skb(sk,
340 339 length + LL_ALLOCATED_SPACE(rt->u.dst.dev) + 15,
341 skb = sock_alloc_send_skb(sk, length+hh_len+15, 340 flags & MSG_DONTWAIT, &err);
342 flags&MSG_DONTWAIT, &err);
343 if (skb == NULL) 341 if (skb == NULL)
344 goto error; 342 goto error;
345 skb_reserve(skb, hh_len); 343 skb_reserve(skb, LL_RESERVED_SPACE(rt->u.dst.dev));
346 344
347 skb->priority = sk->sk_priority; 345 skb->priority = sk->sk_priority;
348 skb->mark = sk->sk_mark; 346 skb->mark = sk->sk_mark;