Commit f2cb691a authored by Veaceslav Falico's avatar Veaceslav Falico Committed by David S. Miller
Browse files

bonding: use the new options to correctly set last_arp_rx

Now that the options are in place - arp_validate can be set to receive all
the traffic or only arp packets to verify if the slave is up, when the
slave isn't validated.

CC: Rob Landley <>
CC: "David S. Miller" <>
CC: Nikolay Aleksandrov <>
CC: Ding Tianhong <>
CC: Neil Horman <>
Signed-off-by: default avatarVeaceslav Falico <>
Signed-off-by: default avatarDavid S. Miller <>
parent 52f65ef3
......@@ -2255,15 +2255,16 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
struct arphdr *arp = (struct arphdr *)skb->data;
unsigned char *arp_ptr;
__be32 sip, tip;
int alen;
int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP);
slave->last_arp_rx = jiffies;
if (skb->protocol != __cpu_to_be16(ETH_P_ARP))
if (!slave_do_arp_validate(bond, slave)) {
if ((slave_do_arp_validate_only(bond, slave) && is_arp) ||
!slave_do_arp_validate_only(bond, slave))
slave->last_arp_rx = jiffies;
if (!slave_do_arp_validate(bond, slave))
goto out_unlock;
} else if (!is_arp) {
alen = arp_hdr_len(bond->dev);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment