bonding: fix incorrect lacp mux state when agg not active
bonding: fix incorrect lacp mux state when agg not active

This patch attempts to fix the following problems when an actor or
partner's aggregator is not active:
    1. a slave's lacp port state is marked as AD_STATE_SYNCHRONIZATION
       even if it is attached to an inactive aggregator. LACP advertises
       this state to the partner, making the partner think he can move
       into COLLECTING_DISTRIBUTING state even though this link will not
       pass traffic on the local side

    2. a slave goes into COLLECTING_DISTRIBUTING state without checking
       if the aggregator is actually active

    3. when in COLLECTING_DISTRIBUTING state, the partner parameters may
       change, e.g. the partner_oper_port_state.SYNCHRONIZATION. The
       local mux machine is not reacting to the change and continue to
       keep the slave and bond up

    4. When bond slave leaves an inactive aggregator and joins an active
       aggregator, the actor oper port state need to update to SYNC state.

v2:
 * fix style issues in bond_3ad.c

Cc: Andy Gospodarek <235a7d7680e417ef53409d6a24f3311a70688752@cumulusnetworks.com>
Reviewed-by: Nikolay Aleksandrov <262b42b771725e3ebec40395f2b058e593df7462@redhat.com>
Signed-off-by: Wilson Kok <9937d6c4e279711f30d620c8f4a144fb654ea717@cumulusnetworks.com>
Signed-off-by: Jonathan Toppins <d37c3608bdaa3ffecc3bffd396174be8f24f61bc@cumulusnetworks.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs