Page MenuHomeFreeBSD

netinet*: replace IP6_EXTHDR_GET()
ClosedPublic

Authored by bz on Nov 12 2019, 6:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 20 2024, 12:36 PM
Unknown Object (File)
Jan 10 2024, 1:39 AM
Unknown Object (File)
Dec 26 2023, 5:19 AM
Unknown Object (File)
Dec 12 2023, 9:14 PM
Unknown Object (File)
Dec 10 2023, 6:20 AM
Unknown Object (File)
Dec 7 2023, 11:52 AM
Unknown Object (File)
Dec 5 2023, 11:40 AM
Unknown Object (File)
Dec 2 2023, 2:19 PM
Subscribers

Details

Summary

In a few places we have IP6_EXTHDR_GET() left in upper layer protocols.
The IP6_EXTHDR_GET() macro might perform an m_pulldown() in case the data
fragment is not contiguous.

Convert these last remaining instances into m_pullup()s instead.
In CARP, for example, we will a few lines later call m_pullup() anyway,
the IPsec code coming from OpenBSD would otherwise have done the m_pullup()
and are copying the data a bit later anyway, so pulling it in seems no
better or worse.

Note: this leaves very few m_pulldown() cases behind in the tree and we
might want to consider removing them as well to make mbuf management
easier again on a path to variable size mbufs, especially given
m_pulldown() still has an issue not re-checking M_WRITEABLE().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable