Module Name: src
Committed By: martin
Date: Fri Mar 30 11:50:56 UTC 2018
Modified Files:
src/sys/netipsec [netbsd-8]: ipsec.c
Log Message:
Pull up following revision(s) (requested by maxv in ticket #669):
sys/netipsec/ipsec.c: revision 1.134
Fix ipsec4_get_ulp(). We should do "goto done" instead of "return",
otherwise the port fields of spidx are uninitialized.
ok mlelstv@
To generate a diff of this commit:
cvs rdiff -u -r1.99.2.4 -r1.99.2.5 src/sys/netipsec/ipsec.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/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.99.2.4 src/sys/netipsec/ipsec.c:1.99.2.5
--- src/sys/netipsec/ipsec.c:1.99.2.4 Fri Feb 16 16:35:18 2018
+++ src/sys/netipsec/ipsec.c Fri Mar 30 11:50:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.99.2.4 2018/02/16 16:35:18 martin Exp $ */
+/* $NetBSD: ipsec.c,v 1.99.2.5 2018/03/30 11:50:56 martin Exp $ */
/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */
/* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.99.2.4 2018/02/16 16:35:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.99.2.5 2018/03/30 11:50:56 martin Exp $");
/*
* IPsec controller part.
@@ -1070,7 +1070,7 @@ ipsec4_get_ulp(struct mbuf *m, struct se
case IPPROTO_ICMP:
spidx->ul_proto = nxt;
if (off + sizeof(struct icmp) > m->m_pkthdr.len)
- return;
+ goto done;
m_copydata(m, off, sizeof(icmph), &icmph);
((struct sockaddr_in *)&spidx->src)->sin_port =
htons((uint16_t)icmph.icmp_type);