Module Name:    src
Committed By:   martin
Date:           Thu Jan 23 10:22:43 UTC 2020

Modified Files:
        src/sys/netinet [netbsd-8]: ip_encap.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1489):

        sys/netinet/ip_encap.c: revision 1.72

Fix PR security/54881.  Pointed out by ohishi@IIJ, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.65.2.4 -r1.65.2.5 src/sys/netinet/ip_encap.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/netinet/ip_encap.c
diff -u src/sys/netinet/ip_encap.c:1.65.2.4 src/sys/netinet/ip_encap.c:1.65.2.5
--- src/sys/netinet/ip_encap.c:1.65.2.4	Wed May 29 15:47:05 2019
+++ src/sys/netinet/ip_encap.c	Thu Jan 23 10:22:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_encap.c,v 1.65.2.4 2019/05/29 15:47:05 martin Exp $	*/
+/*	$NetBSD: ip_encap.c,v 1.65.2.5 2020/01/23 10:22:42 martin Exp $	*/
 /*	$KAME: ip_encap.c,v 1.73 2001/10/02 08:30:58 itojun Exp $	*/
 
 /*
@@ -68,7 +68,7 @@
 #define USE_RADIX
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.65.2.4 2019/05/29 15:47:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.65.2.5 2020/01/23 10:22:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mrouting.h"
@@ -893,10 +893,11 @@ encap6_ctlinput(int cmd, const struct so
 		 	*/
 			match = encap6_lookup(m, off, nxt, OUTBOUND,
 			    &elem_psref);
-			if (match)
+			if (match) {
 				valid++;
-			psref_release(&elem_psref, &match->psref,
-			    encaptab.elem_class);
+				psref_release(&elem_psref, &match->psref,
+				    encaptab.elem_class);
+			}
 
 			/*
 		 	* Depending on the value of "valid" and routing table

Reply via email to