]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netinet*: replace IP6_EXTHDR_GET()
authorbz <bz@FreeBSD.org>
Fri, 15 Nov 2019 21:44:17 +0000 (21:44 +0000)
committerbz <bz@FreeBSD.org>
Fri, 15 Nov 2019 21:44:17 +0000 (21:44 +0000)
commit1feeff48a55e509c470ba536dbe41046e7e9681b
tree24cd0e67c14d1dfffbc2bd4b620685c030032cc5
parent667b9bd5d8bc4673ce6b9c7837e42e5101786ee3
netinet*: replace IP6_EXTHDR_GET()

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().

Reviewed by: gallatin
MFC after: 8 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D22335
sys/netinet/ip_carp.c
sys/netinet6/sctp6_usrreq.c
sys/netipsec/xform_ah.c
sys/netipsec/xform_esp.c