Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78478
b: refs/heads/master
c: 21cf225
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and David S. Miller committed Jan 28, 2008
1 parent dc63527 commit e6658bb
Show file tree
Hide file tree
Showing 3 changed files with 8 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: 3db8cda362dced00caf19865ffda3fa1028c59bc
refs/heads/master: 21cf2253ebcf070bc307e0b56d696a2519c75cb4
3 changes: 2 additions & 1 deletion trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ static void arp_reply(struct sk_buff *skb)
memcpy(&tip, arp_ptr, 4);

/* Should we ignore arp? */
if (tip != htonl(np->local_ip) || LOOPBACK(tip) || MULTICAST(tip))
if (tip != htonl(np->local_ip) ||
ipv4_is_loopback(tip) || ipv4_is_multicast(tip))
return;

size = sizeof(struct arphdr) + 2 * (skb->dev->addr_len + 4);
Expand Down
8 changes: 5 additions & 3 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2358,9 +2358,11 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
t = random32() % (imx - imn) + imn;
s = htonl(t);

while (LOOPBACK(s) || MULTICAST(s)
|| BADCLASS(s) || ZERONET(s)
|| LOCAL_MCAST(s)) {
while (ipv4_is_loopback(s) ||
ipv4_is_multicast(s) ||
ipv4_is_badclass(s) ||
ipv4_is_zeronet(s) ||
ipv4_is_local_multicast(s)) {
t = random32() % (imx - imn) + imn;
s = htonl(t);
}
Expand Down

0 comments on commit e6658bb

Please sign in to comment.