Wed, Oct 11, 2017 at 08:17:38AM CEST, lucien.xin(a)gmail.com wrote:
Now the port ifinfo will be set in obj_input_newlink when a
event is received.
But when a port is being added, if a lacpdu gets received on this port
before the RTM_NEWLINK event, lacpdu_recv will process the packet with
incorrect port ifinfo.
In Patrick's case, as ifinfo->master_ifindex was 0, it would skip this
port in teamd_for_each_tdport, which caused lacp_port->agg_lead not to
be updated in lacp_switch_agg_lead. Later the lacp_port actor would go
to a unexpected state.
This patch is to avoid it by checking teamd_port_present in lacpdu_recv
so that it would not process lacpdu before the port ifinfo is set.
Reported-by: Patrick Talbert <ptalbert(a)redhat.com>
Tested-by: Patrick Talbert <ptalbert(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>