diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3b31c19972d4..976d28e3498a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -2610,19 +2610,16 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave) | |||
2610 | 2610 | ||
2611 | static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32 sip, __be32 tip) | 2611 | static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32 sip, __be32 tip) |
2612 | { | 2612 | { |
2613 | int i; | 2613 | if (!sip || !bond_has_this_ip(bond, tip)) { |
2614 | __be32 *targets = bond->params.arp_targets; | 2614 | pr_debug("bva: sip %pI4 tip %pI4 not found\n", &sip, &tip); |
2615 | return; | ||
2616 | } | ||
2615 | 2617 | ||
2616 | for (i = 0; (i < BOND_MAX_ARP_TARGETS) && targets[i]; i++) { | 2618 | if (bond_get_targets_ip(bond->params.arp_targets, sip) == -1) { |
2617 | pr_debug("bva: sip %pI4 tip %pI4 t[%d] %pI4 bhti(tip) %d\n", | 2619 | pr_debug("bva: sip %pI4 not found in targets\n", &sip); |
2618 | &sip, &tip, i, &targets[i], | 2620 | return; |
2619 | bond_has_this_ip(bond, tip)); | ||
2620 | if (sip == targets[i]) { | ||
2621 | if (bond_has_this_ip(bond, tip)) | ||
2622 | slave->last_arp_rx = jiffies; | ||
2623 | return; | ||
2624 | } | ||
2625 | } | 2621 | } |
2622 | slave->last_arp_rx = jiffies; | ||
2626 | } | 2623 | } |
2627 | 2624 | ||
2628 | static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, | 2625 | static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, |
@@ -4839,7 +4836,7 @@ static int __net_init bond_net_init(struct net *net) | |||
4839 | 4836 | ||
4840 | bond_create_proc_dir(bn); | 4837 | bond_create_proc_dir(bn); |
4841 | bond_create_sysfs(bn); | 4838 | bond_create_sysfs(bn); |
4842 | 4839 | ||
4843 | return 0; | 4840 | return 0; |
4844 | } | 4841 | } |
4845 | 4842 | ||