Skip to content

Commit

Permalink
teamd: lw: nsna_ping: only send ns on enabled port
Browse files Browse the repository at this point in the history
We forget to check forced_send when using nsna_ping link_watch.
Ns is sent from all ports, which cause switch mac flapping. Some
reply packets are delivered to disabled port and dropped directly.

Fix it by checking forced_send and only send ns on enabled port.

Reported-by: LiLiang <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
  • Loading branch information
liuhangbin authored and jpirko committed Mar 8, 2019
1 parent 5f35530 commit 6bf0e87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions teamd/teamd_lw_nsna_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ static int lw_nsnap_send(struct lw_psr_port_priv *psr_ppriv)
struct sockaddr_in6 sendto_addr;
struct ns_packet nsp;

if (!(psr_ppriv->common.forced_send))
return 0;

err = teamd_getsockname_hwaddr(psr_ppriv->sock, &ll_my,
sizeof(nsp.hwaddr));
if (err)
Expand Down

0 comments on commit 6bf0e87

Please sign in to comment.