(part 2) pppX fix for altq/pf

Matthew Dillon dillon at apollo.backplane.com
Fri Aug 24 09:05:57 PDT 2007


:Oops, this is also needed!
:
:     crit_enter();
:     for (mp = &m0; uio->uio_resid; mp = &m->m_next) {
:-       MGET(m, MB_WAIT, MT_DATA);
:+       if ( mp == &m0 ) {
:+               MGETHDR(m, MB_WAIT, MT_DATA);
:+               m->m_pkthdr.len = uio->uio_resid - PPP_HDRLEN;
:+               m->m_pkthdr.rcvif = NULL;
:+       }
:+       else
:+               MGET(m, MB_WAIT, MT_DATA);
:        if ((*mp = m) == NULL) {
:            m_freem(m0);
:-           crit_exit();

    I think that crit_exit() has to stay.

						-Matt





More information about the Submit mailing list