diff --git a/src/compat.h b/src/compat.h index 68b108c..f5b7059 100644 --- a/src/compat.h +++ b/src/compat.h @@ -68,16 +68,6 @@ static inline void taskqgroup_drain_all(struct taskqgroup *tqg) #undef atomic_load_ptr #define atomic_load_ptr(p) (*(volatile __typeof(*p) *)(p)) -static inline void m_snd_tag_rele(struct m_snd_tag *mst) -{ - struct ifnet *ifp; - if (!mst) - return; - ifp = mst->ifp; - ifp->if_snd_tag_free(mst); - if_rele(ifp); -} - #endif #if __FreeBSD_version < 1202000 diff --git a/src/if_wg.c b/src/if_wg.c index ab0b464..8910a0b 100644 --- a/src/if_wg.c +++ b/src/if_wg.c @@ -1478,10 +1478,8 @@ wg_mbuf_reset(struct mbuf *m) m_tag_delete(m, t); } - if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { - m_snd_tag_rele(m->m_pkthdr.snd_tag); - m->m_pkthdr.snd_tag = NULL; - } + KASSERT((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0, + ("%s: mbuf %p has a send tag", __func__, m)); m->m_pkthdr.csum_flags = 0; m->m_pkthdr.PH_per.sixtyfour[0] = 0;