When allocating a new PKTHDR mbuf, always set m->m_pkthdr.rcvif = NULL.
This commit is contained in:
parent
44198f294c
commit
4e256e6e1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53284
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user