diff mbox series

teamd: lw: nsna_ping: only send ns on enabled port

Message ID 20190221093746.28104-1-liuhangbin@gmail.com (mailing list archive)
State New
Headers show
Series teamd: lw: nsna_ping: only send ns on enabled port | expand

Commit Message

Hangbin Liu Feb. 21, 2019, 9:37 a.m. UTC
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>
---
 teamd/teamd_lw_nsna_ping.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jiri Pirko March 8, 2019, 8:41 a.m. UTC | #1
Thu, Feb 21, 2019 at 10:37:46AM CET, liuhangbin@gmail.com wrote:
>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>

applied. Thanks!
diff mbox series

Patch

diff --git a/teamd/teamd_lw_nsna_ping.c b/teamd/teamd_lw_nsna_ping.c
index 127d950..82371c4 100644
--- a/teamd/teamd_lw_nsna_ping.c
+++ b/teamd/teamd_lw_nsna_ping.c
@@ -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)