if (promisc) {
struct sadb_msg *pmsg;
- M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT);
+ M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT, 1);
if (m && m->m_len < sizeof(struct sadb_msg))
m = m_pullup(m, sizeof(struct sadb_msg));
if (!m) {
if (sotorawcb(so) != 0)
return EISCONN; /* XXX panic? */
- kp = (struct keycb *)_MALLOC(sizeof *kp, M_PCB, M_WAITOK); /* XXX */
+ kp = (struct keycb *)_MALLOC(sizeof (*kp), M_PCB,
+ M_WAITOK | M_ZERO); /* XXX */
if (kp == 0)
return ENOBUFS;
- bzero(kp, sizeof *kp);
so->so_pcb = (caddr_t)kp;
kp->kp_promisc = kp->kp_registered = 0;