Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_output.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_output.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.184 retrieving revision 1.185 diff -u -p -r1.184 -r1.185 --- src/sys/netinet6/ip6_output.c 2017/02/17 03:57:17 1.184 +++ src/sys/netinet6/ip6_output.c 2017/02/22 07:05:04 1.185 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.184 2017/02/17 03:57:17 ozaki-r Exp $ */ +/* $NetBSD: ip6_output.c,v 1.185 2017/02/22 07:05:04 ozaki-r Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.184 2017/02/17 03:57:17 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.185 2017/02/22 07:05:04 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1359,6 +1359,7 @@ ip6_ctloutput(int op, struct socket *so, int error, optval; int level, optname; + KASSERT(solocked(so)); KASSERT(sopt != NULL); level = sopt->sopt_level; @@ -2073,6 +2074,8 @@ ip6_pcbopts(struct ip6_pktopts **pktopt, struct mbuf *m; int error = 0; + KASSERT(solocked(so)); + /* turn off any old options. */ if (opt) { #ifdef DIAGNOSTIC @@ -2467,6 +2470,8 @@ ip6_setmoptions(const struct sockopt *so struct ip6_moptions *im6o = in6p->in6p_moptions; struct in6_multi_mship *imm; + KASSERT(in6plocked(in6p)); + if (im6o == NULL) { /* * No multicast option buffer attached to the pcb;