diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 675c93dd4266..ba61a8cc0eae 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -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;