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
This commit is contained in:
Nick Sayer 2000-09-25 17:24:02 +00:00
parent b5fbbe9599
commit 54d2be5a40

View File

@ -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... */
}
/*