if (pcb == NULL)
return (EINVAL);
-
+
+ /*
+ * Set type to MSG_DATA. Otherwise looped back packet is not
+ * recognized by atp_input() and possibly other protocols.
+ */
+
+ MCHTYPE(m, MSG_DATA);
+
if (!(pcb->ddp_flags & DDPFLG_HDRINCL)) {
/* prepend a DDP header */
M_PREPEND(m, DDP_X_HDR_SIZE, M_WAIT);
struct sockaddr_at *sat;
MALLOC(sat, struct sockaddr_at *, sizeof *sat, M_SONAME, M_WAITOK);
+ if (sat == NULL)
+ return(ENOMEM);
bzero((caddr_t)sat, sizeof(*sat));
s = splnet();
struct sockaddr_at *sat;
MALLOC(sat, struct sockaddr_at *, sizeof *sat, M_SONAME, M_WAITOK);
+ if (sat == NULL)
+ return (ENOMEM);
bzero((caddr_t)sat, sizeof(*sat));
s = splnet();