When allocating a new PKTHDR mbuf, always set m->m_pkthdr.rcvif = NULL.

This commit is contained in:
Archie Cobbs 1999-11-17 17:41:22 +00:00
parent 44198f294c
commit 4e256e6e1b
3 changed files with 4 additions and 2 deletions

View File

@ -333,6 +333,7 @@ nglmi_inquire(sc_p sc, int full)
log(LOG_ERR, "nglmi: unable to start up LMI processing\n");
return;
}
m->m_pkthdr.rcvif = NULL;
/* Allocate a meta struct (and leave some slop for options to be
* added by other modules). */
/* MALLOC(meta, meta_p, sizeof( struct ng_meta) + META_PAD,

View File

@ -383,8 +383,8 @@ ngt_input(int c, struct tty *tp)
"%s: can't get mbuf\n", node->name);
ERROUT(ENOBUFS);
}
m->m_len = 0;
m->m_pkthdr.len = 0;
m->m_len = m->m_pkthdr.len = 0;
m->m_pkthdr.rcvif = NULL;
sc->m = m;
}

View File

@ -338,6 +338,7 @@ ng_vjc_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
return (ENOBUFS);
}
hm->m_len = 0;
hm->m_pkthdr.rcvif = NULL;
if (hlen > MHLEN) { /* unlikely, but can happen */
MCLGET(hm, M_DONTWAIT);
if ((hm->m_flags & M_EXT) == 0) {