diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2014-02-18 01:48:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-18 16:47:15 -0500 |
commit | f2cb691a7735d7903398aa914b7e567536ea98e4 (patch) | |
tree | 6ef8dc014244dac6b0811472c9158dbd224dd706 | |
parent | 52f65ef33b3c99e7151ddb065988bb0b556e315e (diff) |
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 <rob@landley.net>
CC: "David S. Miller" <davem@davemloft.net>
CC: Nikolay Aleksandrov <nikolay@redhat.com>
CC: Ding Tianhong <dingtianhong@huawei.com>
CC: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 257ee7f05645..3fe81cdbd8fb 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -2255,15 +2255,16 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, | |||
2255 | struct arphdr *arp = (struct arphdr *)skb->data; | 2255 | struct arphdr *arp = (struct arphdr *)skb->data; |
2256 | unsigned char *arp_ptr; | 2256 | unsigned char *arp_ptr; |
2257 | __be32 sip, tip; | 2257 | __be32 sip, tip; |
2258 | int alen; | 2258 | int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP); |
2259 | 2259 | ||
2260 | slave->last_arp_rx = jiffies; | 2260 | if (!slave_do_arp_validate(bond, slave)) { |
2261 | 2261 | if ((slave_do_arp_validate_only(bond, slave) && is_arp) || | |
2262 | if (skb->protocol != __cpu_to_be16(ETH_P_ARP)) | 2262 | !slave_do_arp_validate_only(bond, slave)) |
2263 | slave->last_arp_rx = jiffies; | ||
2263 | return RX_HANDLER_ANOTHER; | 2264 | return RX_HANDLER_ANOTHER; |
2264 | 2265 | } else if (!is_arp) { | |
2265 | if (!slave_do_arp_validate(bond, slave)) | 2266 | return RX_HANDLER_ANOTHER; |
2266 | goto out_unlock; | 2267 | } |
2267 | 2268 | ||
2268 | alen = arp_hdr_len(bond->dev); | 2269 | alen = arp_hdr_len(bond->dev); |
2269 | 2270 | ||