Module Name:    src
Committed By:   ozaki-r
Date:           Thu Apr 27 09:43:52 UTC 2017

Modified Files:
        src/sys/netipsec: keysock.c

Log Message:
Fix KASSERT; restore a lost statement


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/netipsec/keysock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netipsec/keysock.c
diff -u src/sys/netipsec/keysock.c:1.53 src/sys/netipsec/keysock.c:1.54
--- src/sys/netipsec/keysock.c:1.53	Fri Apr 21 08:38:18 2017
+++ src/sys/netipsec/keysock.c	Thu Apr 27 09:43:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: keysock.c,v 1.53 2017/04/21 08:38:18 ozaki-r Exp $	*/
+/*	$NetBSD: keysock.c,v 1.54 2017/04/27 09:43:52 ozaki-r Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.53 2017/04/21 08:38:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.54 2017/04/27 09:43:52 ozaki-r Exp $");
 
 /* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */
 
@@ -297,7 +297,7 @@ key_sendup_mbuf(struct socket *so, struc
 	int sbprio = 0; /* XXX should be a parameter */
 
 	KASSERT(m != NULL);
-	KASSERT(so != NULL);
+	KASSERT(so != NULL || target != KEY_SENDUP_ONE);
 
 	/*
 	 * RFC 2367 says ACQUIRE and other kernel-generated messages

Reply via email to