summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/lacp/selection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lacp/selection.c b/src/plugins/lacp/selection.c
index 0c9f036308d..1588ebfd2eb 100644
--- a/src/plugins/lacp/selection.c
+++ b/src/plugins/lacp/selection.c
@@ -40,8 +40,8 @@ lacp_set_port_selected (vlib_main_t *vm, bond_if_t *bif, member_if_t *mif)
{
p = *vec_elt_at_index (bif->active_members, 0);
mif2 = bond_get_member_by_sw_if_index (p);
- if ((mif2->partner.key != mif->partner.key) ||
- memcmp (mif2->partner.system, mif->partner.system, 6))
+ if (mif2 && ((mif2->partner.key != mif->partner.key) ||
+ memcmp (mif2->partner.system, mif->partner.system, 6)))
{
mif->selected = LACP_PORT_UNSELECTED;
lacp_machine_dispatch (&lacp_mux_machine, vm, mif,