aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJianjun Kong <jianjun@zeuux.org>2008-11-03 05:48:14 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-03 05:48:14 -0500
commitf4cca7ffb2700bff5752fbbc28f49d58ed2c5cb3 (patch)
treedbf7b28cc43e7099b1ee4869bbf8c9bb8f363c46 /net
parentfd3f8c4cb632c28ef915a535617a0fcddcfe3f80 (diff)
net: clean up net/ipv4/pararp.c
Signed-off-by: Jianjun Kong <jianjun@zeuux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/arp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 051a62fc8189..957c87dc8e16 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -506,7 +506,7 @@ int arp_bind_neighbour(struct dst_entry *dst)
506 if (dev == NULL) 506 if (dev == NULL)
507 return -EINVAL; 507 return -EINVAL;
508 if (n == NULL) { 508 if (n == NULL) {
509 __be32 nexthop = ((struct rtable*)dst)->rt_gateway; 509 __be32 nexthop = ((struct rtable *)dst)->rt_gateway;
510 if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT)) 510 if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT))
511 nexthop = 0; 511 nexthop = 0;
512 n = __neigh_lookup_errno( 512 n = __neigh_lookup_errno(
@@ -640,14 +640,14 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
640 arp_ptr=(unsigned char *)(arp+1); 640 arp_ptr=(unsigned char *)(arp+1);
641 641
642 memcpy(arp_ptr, src_hw, dev->addr_len); 642 memcpy(arp_ptr, src_hw, dev->addr_len);
643 arp_ptr+=dev->addr_len; 643 arp_ptr += dev->addr_len;
644 memcpy(arp_ptr, &src_ip,4); 644 memcpy(arp_ptr, &src_ip, 4);
645 arp_ptr+=4; 645 arp_ptr += 4;
646 if (target_hw != NULL) 646 if (target_hw != NULL)
647 memcpy(arp_ptr, target_hw, dev->addr_len); 647 memcpy(arp_ptr, target_hw, dev->addr_len);
648 else 648 else
649 memset(arp_ptr, 0, dev->addr_len); 649 memset(arp_ptr, 0, dev->addr_len);
650 arp_ptr+=dev->addr_len; 650 arp_ptr += dev->addr_len;
651 memcpy(arp_ptr, &dest_ip, 4); 651 memcpy(arp_ptr, &dest_ip, 4);
652 652
653 return skb; 653 return skb;
@@ -823,9 +823,9 @@ static int arp_process(struct sk_buff *skb)
823 int dont_send = 0; 823 int dont_send = 0;
824 824
825 if (!dont_send) 825 if (!dont_send)
826 dont_send |= arp_ignore(in_dev,sip,tip); 826 dont_send |= arp_ignore(in_dev, sip, tip);
827 if (!dont_send && IN_DEV_ARPFILTER(in_dev)) 827 if (!dont_send && IN_DEV_ARPFILTER(in_dev))
828 dont_send |= arp_filter(sip,tip,dev); 828 dont_send |= arp_filter(sip, tip, dev);
829 if (!dont_send) 829 if (!dont_send)
830 arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha); 830 arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);
831 831