diff options
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r-- | net/ipv4/arp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 1a9dd66511fc..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 | ||
@@ -1308,7 +1308,7 @@ static void arp_format_neigh_entry(struct seq_file *seq, | |||
1308 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 1308 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
1309 | } | 1309 | } |
1310 | #endif | 1310 | #endif |
1311 | sprintf(tbuf, NIPQUAD_FMT, NIPQUAD(*(u32*)n->primary_key)); | 1311 | sprintf(tbuf, "%pI4", n->primary_key); |
1312 | seq_printf(seq, "%-16s 0x%-10x0x%-10x%s * %s\n", | 1312 | seq_printf(seq, "%-16s 0x%-10x0x%-10x%s * %s\n", |
1313 | tbuf, hatype, arp_state_to_flags(n), hbuffer, dev->name); | 1313 | tbuf, hatype, arp_state_to_flags(n), hbuffer, dev->name); |
1314 | read_unlock(&n->lock); | 1314 | read_unlock(&n->lock); |
@@ -1321,7 +1321,7 @@ static void arp_format_pneigh_entry(struct seq_file *seq, | |||
1321 | int hatype = dev ? dev->type : 0; | 1321 | int hatype = dev ? dev->type : 0; |
1322 | char tbuf[16]; | 1322 | char tbuf[16]; |
1323 | 1323 | ||
1324 | sprintf(tbuf, NIPQUAD_FMT, NIPQUAD(*(u32*)n->key)); | 1324 | sprintf(tbuf, "%pI4", n->key); |
1325 | seq_printf(seq, "%-16s 0x%-10x0x%-10x%s * %s\n", | 1325 | seq_printf(seq, "%-16s 0x%-10x0x%-10x%s * %s\n", |
1326 | tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00", | 1326 | tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00", |
1327 | dev ? dev->name : "*"); | 1327 | dev ? dev->name : "*"); |