Fix error with ifq not being set before use. Explicitly set it to NULL just before it may be set to the fastq, since if this becomes a loop (and in one case already is) this will always work. ifq_enqueue2() is designed to handle this case.
This commit is contained in:
parent
4efbb8a57b
commit
fcc0a1f852
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ppp.c,v 1.97 2005/03/31 15:48:13 christos Exp $ */
|
||||
/* $NetBSD: if_ppp.c,v 1.98 2005/03/31 17:07:39 explorer Exp $ */
|
||||
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
|
||||
|
||||
/*
|
||||
|
@ -102,7 +102,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.97 2005/03/31 15:48:13 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.98 2005/03/31 17:07:39 explorer Exp $");
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
|
@ -1024,6 +1024,7 @@ pppoutput(ifp, m0, dst, rtp)
|
|||
m0->m_nextpkt = NULL;
|
||||
sc->sc_npqtail = &m0->m_nextpkt;
|
||||
} else {
|
||||
ifq = NULL;
|
||||
if (m0->m_flags & M_HIGHPRI)
|
||||
ifq = &sc->sc_fastq;
|
||||
if ((error = ifq_enqueue2(&sc->sc_if, ifq, m0
|
||||
|
@ -1079,6 +1080,7 @@ ppp_requeue(sc)
|
|||
*/
|
||||
*mpp = m->m_nextpkt;
|
||||
m->m_nextpkt = NULL;
|
||||
ifq = NULL;
|
||||
if (m->m_flags & M_HIGHPRI)
|
||||
ifq = &sc->sc_fastq;
|
||||
if ((error = ifq_enqueue2(&sc->sc_if, ifq, m ALTQ_COMMA
|
||||
|
|
Loading…
Reference in New Issue