HomeFreeBSD

mbufs: isolate max_linkhdr and max_protohdr handling in the mbuf code

Description

mbufs: isolate max_linkhdr and max_protohdr handling in the mbuf code

o Statically initialize max_linkhdr to default value without relying

on domain(9) code doing that.

o Statically initialize max_protohdr to a sane value, without relying

on TCP being always compiled in.

o Retire max_datalen. Set, but not used.
o Don't make the domain(9) system responsible in validating these

values and updating max_hdr.  Instead provide KPI max_linkhdr_grow()
and max_protohdr_grow().

o Call max_linkhdr_grow() from IEEE802.11 and max_protohdr_grow() from

TCP.  Those are the only protocols today that may want to grow.

Reviewed by: tuexen
Differential revision: https://reviews.freebsd.org/D36376

Details

Provenance
glebiusAuthored on Aug 30 2022, 2:14 AM
Reviewer
tuexen
Differential Revision
D36376: mbufs: isolate max_linkhdr and max_protohdr handling in the mbuf code
Parents
rGbb31aee26bd1: bhyve virtio-scsi: Avoid out of bounds accesses to guest requests.
Branches
Unknown
Tags
Unknown