Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/netinet6 Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/98f8b8e897f0
branches:  netbsd-8
changeset: 850775:98f8b8e897f0
user:      snj <snj%NetBSD.org@localhost>
date:      Sat Jul 01 08:51:04 2017 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #73):
        sys/netinet6/ip6_output.c: revision 1.192
Fix usage of ip6_get_membership
It may set nothing to ifp even if returning 0. So we need to NULL-clear
ifp before calling it.
Fix PR kern/52324

diffstat:

 sys/netinet6/ip6_output.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 2a25bfd94706 -r 98f8b8e897f0 sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Sat Jul 01 08:49:28 2017 +0000
+++ b/sys/netinet6/ip6_output.c Sat Jul 01 08:51:04 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_output.c,v 1.191 2017/03/03 07:13:06 ozaki-r Exp $ */
+/*     $NetBSD: ip6_output.c,v 1.191.6.1 2017/07/01 08:51:04 snj Exp $ */
 /*     $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $    */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.191 2017/03/03 07:13:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.191.6.1 2017/07/01 08:51:04 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2561,8 +2561,10 @@
                 * Group must be a valid IP6 multicast address.
                 */
                bound = curlwp_bind();
+               ifp = NULL;
                error = ip6_get_membership(sopt, &ifp, &psref, &ia, sizeof(ia));
                if (error != 0) {
+                       KASSERT(ifp == NULL);
                        curlwp_bindx(bound);
                        return error;
                }



Home | Main Index | Thread Index | Old Index