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
This commit is contained in:
Fidaullah Noonari 2023-02-28 09:44:12 -07:00 committed by Warner Losh
parent 7fc82fd1f8
commit 290f7f4a09

View File

@ -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);