From 25b8ac3c906c7b506288673276d586bc76d0c194 Mon Sep 17 00:00:00 2001 From: archie Date: Wed, 1 Dec 1999 23:11:58 +0000 Subject: 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. --- sys/netgraph/ng_tee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netgraph/ng_tee.c') diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c index 2c5b9f3..575c870 100644 --- a/sys/netgraph/ng_tee.c +++ b/sys/netgraph/ng_tee.c @@ -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); -- cgit v1.1