Page MenuHomeFreeBSD

D32663.diff
No OneTemporary

D32663.diff

diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -196,6 +196,19 @@
};
DPCPU_DEFINE(struct epair_dpcpu, epair_dpcpu);
+static void
+epair_clear_mbuf(struct mbuf *m)
+{
+ /* Remove any CSUM_SND_TAG as ether_input will barf. */
+ if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) {
+ m_snd_tag_rele(m->m_pkthdr.snd_tag);
+ m->m_pkthdr.snd_tag = NULL;
+ m->m_pkthdr.csum_flags &= ~CSUM_SND_TAG;
+ }
+
+ m_tag_delete_nonpersistent(m);
+}
+
static void
epair_dpcpu_init(void)
{
@@ -435,6 +448,8 @@
}
DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname);
+ epair_clear_mbuf(m);
+
/*
* Add a reference so the interface cannot go while the
* packet is in transit as we rely on rcvif to stay valid.
@@ -556,6 +571,9 @@
(void)epair_add_ifp_for_draining(ifp);
return (error);
}
+
+ epair_clear_mbuf(m);
+
sc = oifp->if_softc;
/*
* Add a reference so the interface cannot go while the

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 17, 2:56 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15832397
Default Alt Text
D32663.diff (976 B)

Event Timeline