Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2016 10:14:54 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r296560 - stable/9/sys/netipsec
Message-ID:  <201603091014.u29AEseU063867@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603091014.u29AEseU063867>