From 54d2be5a40cdd35d62e4f22264367d1aab9979e9 Mon Sep 17 00:00:00 2001 From: Nick Sayer Date: Mon, 25 Sep 2000 17:24:02 +0000 Subject: [PATCH] In theory, m_dup should not be necessary, as m_copypacket should be sifficient. But somewhere (I believe in the UDP stuff), someone is overwriting an mbuf without calling m_pullup() first. This results in broad- and multi-cast traffic that is passed through the bridge getting corrupted. This should be backed out when there is some assurance that the upper layers (and I suppose all of the device drivers) are fixed. Suggested by: archie --- sys/net/bridge.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/bridge.c b/sys/net/bridge.c index 106ddac33ed..7116346170c 100644 --- a/sys/net/bridge.c +++ b/sys/net/bridge.c @@ -802,10 +802,10 @@ forward: if (canfree && once ) { /* no need to copy */ m = *m0 ; *m0 = NULL ; /* original is gone */ - } else /* on a P5-90, m_copypacket takes 540 ticks */ - m = m_copypacket(*m0, M_DONTWAIT); + } else + m = m_dup(*m0, M_DONTWAIT); /* XXX m_copypacket should work */ if (m == NULL) { - printf("bdg_forward: sorry, m_copy failed!\n"); + printf("bdg_forward: sorry, m_dup failed!\n"); return ENOBUFS ; /* the original is still there... */ } /*