diff options
author | ae <ae@FreeBSD.org> | 2016-03-09 10:01:28 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2016-03-09 10:01:28 +0000 |
commit | 1febe34ecc1d0cb1a72a6dda1f699f469d7b2c69 (patch) | |
tree | 3f0d49a5e92b9bd4ad82d973a2df6292710a9caf /sys/netipsec | |
parent | 9ec2d8a930499ae3bc7c8c1cbb5cb96dc98b75a5 (diff) | |
download | FreeBSD-src-1febe34ecc1d0cb1a72a6dda1f699f469d7b2c69.zip FreeBSD-src-1febe34ecc1d0cb1a72a6dda1f699f469d7b2c69.tar.gz |
MFC r295967:
Fix useless check. m_pkthdr.len should be equal to orglen.
Diffstat (limited to 'sys/netipsec')
-rw-r--r-- | sys/netipsec/key.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index a3e3d76..b231158 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -7245,8 +7245,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; |