From owner-freebsd-bugs@freebsd.org Thu Mar 2 23:20:57 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D097CF58BA for ; Thu, 2 Mar 2017 23:20:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51FA015DA for ; Thu, 2 Mar 2017 23:20:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v22NKvpS061490 for ; Thu, 2 Mar 2017 23:20:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 217509] [patch] netinet/netinet6: missing curly braces in inm_merge/in6m_merge Date: Thu, 02 Mar 2017 23:20:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ngie@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 23:20:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217509 Bug ID: 217509 Summary: [patch] netinet/netinet6: missing curly braces in inm_merge/in6m_merge Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: ngie@FreeBSD.org Keywords: patch Filed via internal bugzilla. This will need to be reviewed by someone in ne= t@. diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 078f2f24536a..c97e36159d01 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -1058,9 +1058,10 @@ inm_merge(struct in_multi *inm, /*const*/ struct in_mfilter *imf) /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->imf_st[0] =3D=3D MCAST_EXCLUDE && nsrc0 =3D=3D 0) { if ((imf->imf_st[1] !=3D MCAST_EXCLUDE) || - (imf->imf_st[1] =3D=3D MCAST_EXCLUDE && nsrc1 > 0)) + (imf->imf_st[1] =3D=3D 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. */ diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c index 4effb57d0391..b34d02cf35ad 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] =3D=3D MCAST_EXCLUDE && nsrc0 =3D=3D 0) { if ((imf->im6f_st[1] !=3D MCAST_EXCLUDE) || - (imf->im6f_st[1] =3D=3D MCAST_EXCLUDE && nsrc1 > 0)) + (imf->im6f_st[1] =3D=3D 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. */ Add missing braces around MCAST_EXCLUDE check so .iss_asm (the number of ASM listeners) isn't incorrectly decremented when dealing with MLD-layer source datagrams when inspecting im*s_st[1] (the second state in the structure). Reported by: Coverity Submitted by: Miles Ohlrich Sponsored by: Dell EMC Isilon --=20 You are receiving this mail because: You are the assignee for the bug.=