Fix useless check. m_pkthdr.len should be equal to orglen.
MFC after: 2 weeks
This commit is contained in:
parent
abb8f08388
commit
b833ff5ab4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295967
@ -7204,8 +7204,7 @@ key_parse(struct mbuf *m, struct socket *so)
|
||||
orglen = PFKEY_UNUNIT64(msg->sadb_msg_len);
|
||||
target = KEY_SENDUP_ONE;
|
||||
|
||||
if ((m->m_flags & M_PKTHDR) == 0 ||
|
||||
m->m_pkthdr.len != m->m_pkthdr.len) {
|
||||
if ((m->m_flags & M_PKTHDR) == 0 || m->m_pkthdr.len != orglen) {
|
||||
ipseclog((LOG_DEBUG, "%s: invalid message length.\n",__func__));
|
||||
PFKEYSTAT_INC(out_invlen);
|
||||
error = EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user