Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43890
b: refs/heads/master
c: 47bbec0
h: refs/heads/master
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed Dec 9, 2006
1 parent a435103 commit 4cdf103
Show file tree
Hide file tree
Showing 2 changed files with 11 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: e07bca84cd9d31f76ed655d51e68b6a0ca15f162
refs/heads/master: 47bbec0282cce900f16a8dd6397260e076400edb
14 changes: 10 additions & 4 deletions trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ static void arp_reply(struct sk_buff *skb)
unsigned char *arp_ptr;
int size, type = ARPOP_REPLY, ptype = ETH_P_ARP;
__be32 sip, tip;
unsigned char *sha;
struct sk_buff *send_skb;
struct netpoll *np = NULL;

Expand All @@ -356,9 +357,14 @@ static void arp_reply(struct sk_buff *skb)
arp->ar_op != htons(ARPOP_REQUEST))
return;

arp_ptr = (unsigned char *)(arp+1) + skb->dev->addr_len;
arp_ptr = (unsigned char *)(arp+1);
/* save the location of the src hw addr */
sha = arp_ptr;
arp_ptr += skb->dev->addr_len;
memcpy(&sip, arp_ptr, 4);
arp_ptr += 4 + skb->dev->addr_len;
arp_ptr += 4;
/* if we actually cared about dst hw addr, it would get copied here */
arp_ptr += skb->dev->addr_len;
memcpy(&tip, arp_ptr, 4);

/* Should we ignore arp? */
Expand All @@ -381,7 +387,7 @@ static void arp_reply(struct sk_buff *skb)

if (np->dev->hard_header &&
np->dev->hard_header(send_skb, skb->dev, ptype,
np->remote_mac, np->local_mac,
sha, np->local_mac,
send_skb->len) < 0) {
kfree_skb(send_skb);
return;
Expand All @@ -405,7 +411,7 @@ static void arp_reply(struct sk_buff *skb)
arp_ptr += np->dev->addr_len;
memcpy(arp_ptr, &tip, 4);
arp_ptr += 4;
memcpy(arp_ptr, np->remote_mac, np->dev->addr_len);
memcpy(arp_ptr, sha, np->dev->addr_len);
arp_ptr += np->dev->addr_len;
memcpy(arp_ptr, &sip, 4);

Expand Down

0 comments on commit 4cdf103

Please sign in to comment.