Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310782
b: refs/heads/master
c: 954fba0
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 13, 2012
1 parent 3824c37 commit a1d0c00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ee31c6898ea5537fcea160999d60dc63bc0c305
refs/heads/master: 954fba0274058d27c7c07b5ea07c41b3b7477894
11 changes: 6 additions & 5 deletions trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,22 +362,23 @@ EXPORT_SYMBOL(netpoll_send_skb_on_dev);

void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
{
int total_len, eth_len, ip_len, udp_len;
int total_len, ip_len, udp_len;
struct sk_buff *skb;
struct udphdr *udph;
struct iphdr *iph;
struct ethhdr *eth;

udp_len = len + sizeof(*udph);
ip_len = eth_len = udp_len + sizeof(*iph);
total_len = eth_len + ETH_HLEN + NET_IP_ALIGN;
ip_len = udp_len + sizeof(*iph);
total_len = ip_len + LL_RESERVED_SPACE(np->dev);

skb = find_skb(np, total_len, total_len - len);
skb = find_skb(np, total_len + np->dev->needed_tailroom,
total_len - len);
if (!skb)
return;

skb_copy_to_linear_data(skb, msg, len);
skb->len += len;
skb_put(skb, len);

skb_push(skb, sizeof(*udph));
skb_reset_transport_header(skb);
Expand Down

0 comments on commit a1d0c00

Please sign in to comment.