Skip to content

Commit

Permalink
net: clean up net/ipv4/pararp.c
Browse files Browse the repository at this point in the history
Signed-off-by: Jianjun Kong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Jianjun Kong authored and davem330 committed Nov 3, 2008
1 parent fd3f8c4 commit f4cca7f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions net/ipv4/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ int arp_bind_neighbour(struct dst_entry *dst)
if (dev == NULL)
return -EINVAL;
if (n == NULL) {
__be32 nexthop = ((struct rtable*)dst)->rt_gateway;
__be32 nexthop = ((struct rtable *)dst)->rt_gateway;
if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT))
nexthop = 0;
n = __neigh_lookup_errno(
Expand Down Expand Up @@ -640,14 +640,14 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
arp_ptr=(unsigned char *)(arp+1);

memcpy(arp_ptr, src_hw, dev->addr_len);
arp_ptr+=dev->addr_len;
memcpy(arp_ptr, &src_ip,4);
arp_ptr+=4;
arp_ptr += dev->addr_len;
memcpy(arp_ptr, &src_ip, 4);
arp_ptr += 4;
if (target_hw != NULL)
memcpy(arp_ptr, target_hw, dev->addr_len);
else
memset(arp_ptr, 0, dev->addr_len);
arp_ptr+=dev->addr_len;
arp_ptr += dev->addr_len;
memcpy(arp_ptr, &dest_ip, 4);

return skb;
Expand Down Expand Up @@ -823,9 +823,9 @@ static int arp_process(struct sk_buff *skb)
int dont_send = 0;

if (!dont_send)
dont_send |= arp_ignore(in_dev,sip,tip);
dont_send |= arp_ignore(in_dev, sip, tip);
if (!dont_send && IN_DEV_ARPFILTER(in_dev))
dont_send |= arp_filter(sip,tip,dev);
dont_send |= arp_filter(sip, tip, dev);
if (!dont_send)
arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);

Expand Down

0 comments on commit f4cca7f

Please sign in to comment.