Date: Tue, 18 Jul 2017 16:58:52 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321134 - in stable/10/sys: netinet netinet6 Message-ID: <201707181658.v6IGwqoh041085@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Jul 18 16:58:52 2017 New Revision: 321134 URL: https://svnweb.freebsd.org/changeset/base/321134 Log: 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] Modified: stable/10/sys/netinet/in_mcast.c stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_mcast.c ============================================================================== --- stable/10/sys/netinet/in_mcast.c Tue Jul 18 16:49:24 2017 (r321133) +++ stable/10/sys/netinet/in_mcast.c Tue Jul 18 16:58:52 2017 (r321134) @@ -1014,9 +1014,10 @@ inm_merge(struct in_multi *inm, /*const*/ struct in_mf /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->imf_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->imf_st[1] != MCAST_EXCLUDE) || - (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_IGMPV3, "%s: --asm on inm at t1", __func__); --inm->inm_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ Modified: stable/10/sys/netinet6/in6_mcast.c ============================================================================== --- stable/10/sys/netinet6/in6_mcast.c Tue Jul 18 16:49:24 2017 (r321133) +++ stable/10/sys/netinet6/in6_mcast.c Tue Jul 18 16:58:52 2017 (r321134) @@ -1000,9 +1000,10 @@ in6m_merge(struct in6_multi *inm, /*const*/ struct in6 /* 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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707181658.v6IGwqoh041085>