From ca76d4c33634dfed6c10109d19b9bb9b38f52df7 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 10 Jun 2022 14:33:05 -0400 Subject: [PATCH] freebsd_network: Add missing case for MCLBYTES in m_get2. The first case is really just a standard mbuf without a cluster. MCLBYTES should be the second case. This matches what FreeBSD does. --- src/libs/compat/freebsd_network/mbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/compat/freebsd_network/mbuf.c b/src/libs/compat/freebsd_network/mbuf.c index d9389341c8..906feb9098 100644 --- a/src/libs/compat/freebsd_network/mbuf.c +++ b/src/libs/compat/freebsd_network/mbuf.c @@ -171,6 +171,8 @@ struct mbuf * m_get2(int size, int how, short type, int flags) { if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) { + return _m_get(how, type, flags); + } else if (size <= MCLBYTES) { size = MCLBYTES; } else if (size <= MJUMPAGESIZE) { size = MJUMPAGESIZE;