openbsd_network: Correct return values of m_dup_pkthdr and m_tag_copy_chain.

FreeBSD's versions return 1 on success, OpenBSD's return 0.
Fixes at least some of the packet loss in OpenBSD WiFi drivers.
This commit is contained in:
Augustin Cavalier 2022-07-07 16:41:49 -04:00
parent d51cccd9a5
commit b5eee5ce22

View File

@ -30,6 +30,21 @@
#define MCLGETL m_cljget
static int
m_dup_pkthdr_openbsd(struct mbuf* to, const struct mbuf* from, int how)
{
return !m_dup_pkthdr(to, from, how);
}
#define m_dup_pkthdr m_dup_pkthdr_openbsd
static int
m_tag_copy_chain_openbsd(struct mbuf* to, const struct mbuf* from, int how)
{
return !m_tag_copy_chain(to, from, how);
}
#define m_tag_copy_chain m_tag_copy_chain_openbsd
/* FreeBSD methods not compatible with their OpenBSD counterparts */
#define m_defrag(mbuf, how) __m_defrag_unimplemented()