From e7e621e63e213cdae6d9050336e475465b1cef53 Mon Sep 17 00:00:00 2001 From: ngie Date: Tue, 18 Jul 2017 16:58:54 +0000 Subject: MFC r318255: Add missing braces around MCAST_EXCLUDE check when KTR support is compiled into the kernel This ensures that .iss_asm (the number of ASM listeners) isn't incorrectly decremented for MLD-layer source datagrams when inspecting im*s_st[1] (the second state in the structure). PR: 217509 [1] --- sys/netinet6/in6_mcast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/netinet6') diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c index 4effb57..b34d02c 100644 --- a/sys/netinet6/in6_mcast.c +++ b/sys/netinet6/in6_mcast.c @@ -999,9 +999,10 @@ in6m_merge(struct in6_multi *inm, /*const*/ struct in6_mfilter *imf) /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->im6f_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->im6f_st[1] != MCAST_EXCLUDE) || - (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_MLD, "%s: --asm on inm at t1", __func__); --inm->in6m_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ -- cgit v1.1