git: 290f7f4a0921 - main - in_mcat.c: change multicast not member condition

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sat, 04 Mar 2023 05:29:08 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=290f7f4a0921d1606aae8568a04f12025fbf834c

commit 290f7f4a0921d1606aae8568a04f12025fbf834c
Author:     Fidaullah Noonari <fidaullah.noonari@emumba.com>
AuthorDate: 2023-02-28 16:44:12 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-03-04 05:25:17 +0000

    in_mcat.c: change multicast not member condition
    
    If there is no source filter entry => block if that's SSM ("exclude"
    mode per RFC 3678 clause 3).  If there is an entry => check its action &
    block if the action is "exclude".
    
    It would be nice if the test case in this PR were converted into an ATF
    test case, but not blocking on that.
    
    Reviewed by: imp, melifaro
    Pull Request: https://github.com/freebsd/freebsd-src/pull/601
---
 sys/netinet/in_mcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index bbedbf8ceaa3..ef29a8072ccb 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -480,7 +480,7 @@ imo_multi_filter(const struct ip_moptions *imo, const struct ifnet *ifp,
 	ims = imo_match_source(imf, src);
 
 	if ((ims == NULL && mode == MCAST_INCLUDE) ||
-	    (ims != NULL && ims->imsl_st[0] != mode))
+	    (ims != NULL && ims->imsl_st[0] == MCAST_EXCLUDE))
 		return (MCAST_NOTSMEMBER);
 
 	return (MCAST_PASS);