Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bedabf90 authored by dingtianhong's avatar dingtianhong Committed by David S. Miller
Browse files

bonding: simplify the slave_do_arp_validate_only()



The argument slave is not used for slave_do_arp_validate_only(), so no need
to keep it, make the function more simple.

Cc: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31924325
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2291,8 +2291,8 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
	int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP);
	int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP);


	if (!slave_do_arp_validate(bond, slave)) {
	if (!slave_do_arp_validate(bond, slave)) {
		if ((slave_do_arp_validate_only(bond, slave) && is_arp) ||
		if ((slave_do_arp_validate_only(bond) && is_arp) ||
		    !slave_do_arp_validate_only(bond, slave))
		    !slave_do_arp_validate_only(bond))
			slave->last_rx = jiffies;
			slave->last_rx = jiffies;
		return RX_HANDLER_ANOTHER;
		return RX_HANDLER_ANOTHER;
	} else if (!is_arp) {
	} else if (!is_arp) {
+1 −2
Original line number Original line Diff line number Diff line
@@ -396,8 +396,7 @@ static inline int slave_do_arp_validate(struct bonding *bond,
	return bond->params.arp_validate & (1 << bond_slave_state(slave));
	return bond->params.arp_validate & (1 << bond_slave_state(slave));
}
}


static inline int slave_do_arp_validate_only(struct bonding *bond,
static inline int slave_do_arp_validate_only(struct bonding *bond)
					     struct slave *slave)
{
{
	return bond->params.arp_validate & BOND_ARP_FILTER;
	return bond->params.arp_validate & BOND_ARP_FILTER;
}
}