The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=baa7ab7f484bb8895d42900c74bc63d5e92e0266
commit baa7ab7f484bb8895d42900c74bc63d5e92e0266 Author: Mark Johnston <[email protected]> AuthorDate: 2026-08-03 20:44:14 +0000 Commit: Mark Johnston <[email protected]> CommitDate: 2026-08-17 12:07:40 +0000 ip_mroute: Don't assume that a multicast router is running The SIOCGETSGCNT handler may be invoked in this scenario, and if no router has initialized the lookup table, we'll have mfct->mfchashtbl == NULL. PR: 297148 Reported by: Robert Morris MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 1c0d2f0b1a98526e4f1f5a051ce6904b4c3164e1) --- sys/netinet/ip_mroute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 18d26735e339..96bc86bbac08 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -384,6 +384,8 @@ mfc_find(const struct mfctable *mfct, const struct in_addr *o, MRW_LOCK_ASSERT(); + if (mfct->mfchashtbl == NULL) + return (NULL); LIST_FOREACH(rt, &mfct->mfchashtbl[MFCHASH(*o, *g)], mfc_hash) { if (in_hosteq(rt->mfc_origin, *o) && in_hosteq(rt->mfc_mcastgrp, *g) &&
