git: 88e1bc06692a - stable/14 - mcast: fix leaked igmp packets on multicast cleanup
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 26 Aug 2024 15:51:54 UTC
The branch stable/14 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=88e1bc06692ae4552462945c53b5047e8dad5929
commit 88e1bc06692ae4552462945c53b5047e8dad5929
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-12-13 12:32:08 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-08-26 15:46:21 +0000
mcast: fix leaked igmp packets on multicast cleanup
When we release a multicast address (e.g. on interface shutdown) we may
still have packets queued in inm_scq. We have to free those, or we'll
leak memory.
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43033
(cherry picked from commit c2e340452c147b551180f2a1600ae76491342b0e)
---
sys/netinet/in_mcast.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index f93c4b0dac8c..3dc4fa271683 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -1181,6 +1181,7 @@ inm_purge(struct in_multi *inm)
free(ims, M_IPMSOURCE);
inm->inm_nsrc--;
}
+ mbufq_drain(&inm->inm_scq);
}
/*