svn commit: r296560 - stable/9/sys/netipsec

Andrey V. Elsukov ae at FreeBSD.org
Wed Mar 9 10:14:55 UTC 2016


Author: ae
Date: Wed Mar  9 10:14:53 2016
New Revision: 296560
URL: https://svnweb.freebsd.org/changeset/base/296560

Log:
  MFC r295967:
    Fix useless check. m_pkthdr.len should be equal to orglen.

Modified:
  stable/9/sys/netipsec/key.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netipsec/key.c
==============================================================================
--- stable/9/sys/netipsec/key.c	Wed Mar  9 10:09:51 2016	(r296559)
+++ stable/9/sys/netipsec/key.c	Wed Mar  9 10:14:53 2016	(r296560)
@@ -7338,8 +7338,7 @@ key_parse(m, 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;


More information about the svn-src-stable-9 mailing list