Skip to content

Commit 2c14610

Browse files
Veaceslav Falicodavem330
authored andcommitted
bonding: don't validate arp if we don't have to
Currently, we validate all the incoming arps if arp_validate not 0. However, we don't have to validate backup slaves if arp_validate == active and vice versa, so return early in bond_arp_rcv() in these cases. It works correctly now because we verify arp_validate in slave_last_rx(), however we're just doing useless work in bond_arp_rcv(). Signed-off-by: Veaceslav Falico <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0afee4e commit 2c14610

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2634,6 +2634,10 @@ static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
26342634
return RX_HANDLER_ANOTHER;
26352635

26362636
read_lock(&bond->lock);
2637+
2638+
if (!slave_do_arp_validate(bond, slave))
2639+
goto out_unlock;
2640+
26372641
alen = arp_hdr_len(bond->dev);
26382642

26392643
pr_debug("bond_arp_rcv: bond %s skb->dev %s\n",

0 commit comments

Comments
 (0)