Use m_dup() instead of m_copypacket() to duplicate the mbuf chain.

This fixes a bug where if the original packet was modified downstream
of the tee node, then the copy could get modified too.
This commit is contained in:
Archie Cobbs 1999-12-01 23:11:58 +00:00
parent 37438111e1
commit 3fae25a8a6

View file

@ -260,7 +260,7 @@ ngt_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
meta_p meta2;
/* Copy packet */
m2 = m_copypacket(m, M_NOWAIT);
m2 = m_dup(m, M_NOWAIT);
if (m2 == NULL) {
NG_FREE_DATA(m, meta);
return (ENOBUFS);