lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 May 2009 09:13:42 -0700
From:	Jay Vosburgh <fubar@...ibm.com>
To:	Jiri Pirko <jpirko@...hat.com>
cc:	netdev@...r.kernel.org, davem@...emloft.net,
	bonding-devel@...ts.sourceforge.net
Subject: Re: [PATCH] bonding: use bond_is_lb() when it's appropriate

Jiri Pirko <jpirko@...hat.com> wrote:

>[PATCH] bonding: use bond_is_lb() when it's appropriate
>
>Signed-off-by: Jiri Pirko <jpirko@...hat.com>

	Looks good.

Signed-off-by: Jay Vosburgh <fubar@...ibm.com>


>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 7482402..3ec7d52 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -2399,8 +2399,7 @@ static void bond_miimon_commit(struct bonding *bond)
> 				bond_3ad_handle_link_change(slave,
> 							    BOND_LINK_DOWN);
>
>-			if (bond->params.mode == BOND_MODE_TLB ||
>-			    bond->params.mode == BOND_MODE_ALB)
>+			if (bond_is_lb(bond))
> 				bond_alb_handle_link_change(bond, slave,
> 							    BOND_LINK_DOWN);
>
>diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
>index ca849d2..41ceca1 100644
>--- a/drivers/net/bonding/bonding.h
>+++ b/drivers/net/bonding/bonding.h
>@@ -286,8 +286,7 @@ static inline unsigned long slave_last_rx(struct bonding *bond,
> static inline void bond_set_slave_inactive_flags(struct slave *slave)
> {
> 	struct bonding *bond = netdev_priv(slave->dev->master);
>-	if (bond->params.mode != BOND_MODE_TLB &&
>-	    bond->params.mode != BOND_MODE_ALB)
>+	if (!bond_is_lb(bond))
> 		slave->state = BOND_STATE_BACKUP;
> 	slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
> 	if (slave_do_arp_validate(bond, slave))
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ