Date: Sun, 11 Mar 2018 18:46:40 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330777 - head/sys/netipsec Message-ID: <201803111846.w2BIkem5023050@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Sun Mar 11 18:46:40 2018 New Revision: 330777 URL: https://svnweb.freebsd.org/changeset/base/330777 Log: Add KASSERT to check that proper targed was used. MFC after: 2 weeks Modified: head/sys/netipsec/keysock.c Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Sun Mar 11 18:43:36 2018 (r330776) +++ head/sys/netipsec/keysock.c Sun Mar 11 18:46:40 2018 (r330777) @@ -185,6 +185,8 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int KASSERT(m != NULL, ("NULL mbuf pointer was passed.")); KASSERT(so != NULL || target != KEY_SENDUP_ONE, ("NULL socket pointer was passed.")); + KASSERT(target == KEY_SENDUP_ONE || target == KEY_SENDUP_ALL || + target == KEY_SENDUP_REGISTERED, ("Wrong target %d", target)); PFKEYSTAT_INC(in_total); PFKEYSTAT_ADD(in_bytes, m->m_pkthdr.len);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803111846.w2BIkem5023050>