Fix reported errno.

MFC after: 3 days
This commit is contained in:
Michael Tuexen 2012-04-19 12:47:18 +00:00
parent 921569e288
commit 953b6058cc

View File

@ -2553,8 +2553,8 @@ sctp_add_pad_tombuf(struct mbuf *m, int padlen)
tmp = sctp_get_mbuf_for_msg(padlen, 0, M_DONTWAIT, 1, MT_DATA);
if (tmp == NULL) {
/* Out of space GAK! we are in big trouble. */
SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL);
return (ENOSPC);
SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS);
return (ENOBUFS);
}
/* setup and insert in middle */
SCTP_BUF_LEN(tmp) = padlen;