summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2019-10-23 08:35:43 -0700
committerSteven Luong <sluong@cisco.com>2019-10-23 08:36:41 -0700
commit9ad27550b54ee65648487b6405bb61925ccd3397 (patch)
treefd6b31ed47094bcff7a32fbdfdeb79378bf10662 /src/plugins
parent66b1689cfa1cd53d1c24fa68cffef6d507b866f9 (diff)
lacp: add actor steady state check prior to skip processing lacp pdu
In a rare event, we may be skipping processing lacp pdu's when the it is not in steady state. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0872c49e10bbd3538398030a2aa0fa4c3b7e9426
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lacp/input.c4
-rw-r--r--src/plugins/lacp/protocol.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/lacp/input.c b/src/plugins/lacp/input.c
index 8212b119784..5f1753174f6 100644
--- a/src/plugins/lacp/input.c
+++ b/src/plugins/lacp/input.c
@@ -142,7 +142,6 @@ lacp_input (vlib_main_t * vm, vlib_buffer_t * b0, u32 bi0)
lacp_error_t e;
marker_pdu_t *marker;
uword last_packet_signature;
- bond_if_t *bif;
sif =
bond_get_slave_by_sw_if_index (vnet_buffer (b0)->sw_if_index[VLIB_RX]);
@@ -203,10 +202,9 @@ lacp_input (vlib_main_t * vm, vlib_buffer_t * b0, u32 bi0)
last_packet_signature =
hash_memory (sif->last_rx_pkt, vec_len (sif->last_rx_pkt), 0xd00b);
- bif = bond_get_master_by_dev_instance (sif->bif_dev_instance);
if (sif->last_packet_signature_valid &&
(sif->last_packet_signature == last_packet_signature) &&
- hash_get (bif->active_slave_by_sw_if_index, sif->sw_if_index))
+ ((sif->actor.state & LACP_STEADY_STATE) == LACP_STEADY_STATE))
{
lacp_start_current_while_timer (lm->vlib_main, sif,
sif->ttl_in_seconds);
diff --git a/src/plugins/lacp/protocol.h b/src/plugins/lacp/protocol.h
index 9fc2f35fd38..347e944f95e 100644
--- a/src/plugins/lacp/protocol.h
+++ b/src/plugins/lacp/protocol.h
@@ -61,6 +61,10 @@ typedef enum
_(6, DEFAULTED, "defaulted") \
_(7, EXPIRED, "expired")
+#define LACP_STEADY_STATE (LACP_STATE_SYNCHRONIZATION | \
+ LACP_STATE_COLLECTING | \
+ LACP_STATE_DISTRIBUTING)
+
typedef enum
{
#define _(a, b, c) LACP_STATE_##b = (1 << a),