mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
allow more than MLEN bytes for ancillary data to meet the
requirement of Section 20.1 of RFC3542. Obtained from: KAME MFC after: 1 week
This commit is contained in:
parent
cad1917d48
commit
7a1a900c65
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130184
@ -1574,11 +1574,19 @@ sockargs(mp, buf, buflen, type)
|
||||
buflen = MLEN; /* unix domain compat. hack */
|
||||
else
|
||||
#endif
|
||||
return (EINVAL);
|
||||
if ((u_int)buflen > MCLBYTES)
|
||||
return (EINVAL);
|
||||
}
|
||||
m = m_get(M_TRYWAIT, type);
|
||||
if (m == NULL)
|
||||
return (ENOBUFS);
|
||||
if ((u_int)buflen > MLEN) {
|
||||
MCLGET(m, M_TRYWAIT);
|
||||
if ((m->m_flags & M_EXT) == 0) {
|
||||
m_free(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
}
|
||||
m->m_len = buflen;
|
||||
error = copyin(buf, mtod(m, caddr_t), (u_int)buflen);
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user