]> git.hungrycats.org Git - linux/commitdiff
bonding: fix miimon failure counter
authorJay Vosburgh <fubar@us.ibm.com>
Fri, 31 Oct 2008 00:41:14 +0000 (17:41 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 18 Dec 2008 17:13:35 +0000 (09:13 -0800)
commit fba4acda35f3119328bcba28aacefae14245d2bb upstream.

During the rework of the mii monitor for:

  commit f0c76d61779b153dbfb955db3f144c62d02173c2
  Author: Jay Vosburgh <fubar@us.ibm.com>
  Date:   Wed Jul 2 18:21:58 2008 -0700

    bonding: refactor mii monitor

I left out the increment of the link failure counter.  This
patch corrects that omission.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/bonding/bond_main.c

index c792138511e6b599a52d3740d6459630733b6969..1b9c4dc6f0cf6ed7975a526c2bf251fe3cd97180 100644 (file)
@@ -2370,6 +2370,9 @@ static void bond_miimon_commit(struct bonding *bond)
                        continue;
 
                case BOND_LINK_DOWN:
+                       if (slave->link_failure_count < UINT_MAX)
+                               slave->link_failure_count++;
+
                        slave->link = BOND_LINK_DOWN;
 
                        if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||