diff options
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index f10927639b5c..6f49ca7e9b66 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -682,16 +682,16 @@ static ssize_t bonding_store_arp_targets(struct device *d, | |||
682 | struct device_attribute *attr, | 682 | struct device_attribute *attr, |
683 | const char *buf, size_t count) | 683 | const char *buf, size_t count) |
684 | { | 684 | { |
685 | u32 newtarget; | 685 | __be32 newtarget; |
686 | int i = 0, done = 0, ret = count; | 686 | int i = 0, done = 0, ret = count; |
687 | struct bonding *bond = to_bond(d); | 687 | struct bonding *bond = to_bond(d); |
688 | u32 *targets; | 688 | __be32 *targets; |
689 | 689 | ||
690 | targets = bond->params.arp_targets; | 690 | targets = bond->params.arp_targets; |
691 | newtarget = in_aton(buf + 1); | 691 | newtarget = in_aton(buf + 1); |
692 | /* look for adds */ | 692 | /* look for adds */ |
693 | if (buf[0] == '+') { | 693 | if (buf[0] == '+') { |
694 | if ((newtarget == 0) || (newtarget == INADDR_BROADCAST)) { | 694 | if ((newtarget == 0) || (newtarget == htonl(INADDR_BROADCAST))) { |
695 | printk(KERN_ERR DRV_NAME | 695 | printk(KERN_ERR DRV_NAME |
696 | ": %s: invalid ARP target %u.%u.%u.%u specified for addition\n", | 696 | ": %s: invalid ARP target %u.%u.%u.%u specified for addition\n", |
697 | bond->dev->name, NIPQUAD(newtarget)); | 697 | bond->dev->name, NIPQUAD(newtarget)); |
@@ -727,7 +727,7 @@ static ssize_t bonding_store_arp_targets(struct device *d, | |||
727 | 727 | ||
728 | } | 728 | } |
729 | else if (buf[0] == '-') { | 729 | else if (buf[0] == '-') { |
730 | if ((newtarget == 0) || (newtarget == INADDR_BROADCAST)) { | 730 | if ((newtarget == 0) || (newtarget == htonl(INADDR_BROADCAST))) { |
731 | printk(KERN_ERR DRV_NAME | 731 | printk(KERN_ERR DRV_NAME |
732 | ": %s: invalid ARP target %d.%d.%d.%d specified for removal\n", | 732 | ": %s: invalid ARP target %d.%d.%d.%d specified for removal\n", |
733 | bond->dev->name, NIPQUAD(newtarget)); | 733 | bond->dev->name, NIPQUAD(newtarget)); |