Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40052
b: refs/heads/master
c: 206daaf
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Oct 20, 2006
1 parent 615493a commit 51a9375
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 6723ab549df777742801716d7aeea397e6e97f2c
refs/heads/master: 206daaf77f68ce0f103164e6406336068c87a4a5
8 changes: 4 additions & 4 deletions trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
memcpy(skb->data, msg, len);
skb->len += len;

udph = (struct udphdr *) skb_push(skb, sizeof(*udph));
skb->h.uh = udph = (struct udphdr *) skb_push(skb, sizeof(*udph));
udph->source = htons(np->local_port);
udph->dest = htons(np->remote_port);
udph->len = htons(udp_len);
udph->check = 0;

iph = (struct iphdr *)skb_push(skb, sizeof(*iph));
skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph));

/* iph->version = 4; iph->ihl = 5; */
put_unaligned(0x45, (unsigned char *)iph);
Expand All @@ -357,8 +357,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);

eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);

eth->h_proto = htons(ETH_P_IP);
skb->mac.raw = skb->data;
skb->protocol = eth->h_proto = htons(ETH_P_IP);
memcpy(eth->h_source, np->local_mac, 6);
memcpy(eth->h_dest, np->remote_mac, 6);

Expand Down

0 comments on commit 51a9375

Please sign in to comment.