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.
This commit is contained in:
Augustin Cavalier
2022-06-10 14:33:05 -04:00
parent fe476826e7
commit ca76d4c336
+2
View File
@@ -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;