aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 71edf03544aa..bd70bbc7992c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2254,6 +2254,7 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
2254 struct slave *slave) 2254 struct slave *slave)
2255{ 2255{
2256 struct arphdr *arp = (struct arphdr *)skb->data; 2256 struct arphdr *arp = (struct arphdr *)skb->data;
2257 struct slave *curr_active_slave;
2257 unsigned char *arp_ptr; 2258 unsigned char *arp_ptr;
2258 __be32 sip, tip; 2259 __be32 sip, tip;
2259 int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP); 2260 int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP);
@@ -2299,6 +2300,8 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
2299 bond->params.arp_validate, slave_do_arp_validate(bond, slave), 2300 bond->params.arp_validate, slave_do_arp_validate(bond, slave),
2300 &sip, &tip); 2301 &sip, &tip);
2301 2302
2303 curr_active_slave = rcu_dereference(bond->curr_active_slave);
2304
2302 /* 2305 /*
2303 * Backup slaves won't see the ARP reply, but do come through 2306 * Backup slaves won't see the ARP reply, but do come through
2304 * here for each ARP probe (so we swap the sip/tip to validate 2307 * here for each ARP probe (so we swap the sip/tip to validate
@@ -2312,11 +2315,12 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
2312 * is done to avoid endless looping when we can't reach the 2315 * is done to avoid endless looping when we can't reach the
2313 * arp_ip_target and fool ourselves with our own arp requests. 2316 * arp_ip_target and fool ourselves with our own arp requests.
2314 */ 2317 */
2318
2315 if (bond_is_active_slave(slave)) 2319 if (bond_is_active_slave(slave))
2316 bond_validate_arp(bond, slave, sip, tip); 2320 bond_validate_arp(bond, slave, sip, tip);
2317 else if (bond->curr_active_slave && 2321 else if (curr_active_slave &&
2318 time_after(slave_last_rx(bond, bond->curr_active_slave), 2322 time_after(slave_last_rx(bond, curr_active_slave),
2319 bond->curr_active_slave->last_link_up)) 2323 curr_active_slave->last_link_up))
2320 bond_validate_arp(bond, slave, tip, sip); 2324 bond_validate_arp(bond, slave, tip, sip);
2321 2325
2322out_unlock: 2326out_unlock: