Module Name: src
Committed By: maxv
Date: Mon Feb 12 08:13:08 UTC 2018
Modified Files:
src/sys/netinet: tcp_input.c
Log Message:
Add a KASSERT.
To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/sys/netinet/tcp_input.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/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.377 src/sys/netinet/tcp_input.c:1.378
--- src/sys/netinet/tcp_input.c:1.377 Mon Feb 12 08:08:28 2018
+++ src/sys/netinet/tcp_input.c Mon Feb 12 08:13:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_input.c,v 1.377 2018/02/12 08:08:28 maxv Exp $ */
+/* $NetBSD: tcp_input.c,v 1.378 2018/02/12 08:13:08 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.377 2018/02/12 08:08:28 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.378 2018/02/12 08:13:08 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1616,6 +1616,8 @@ nosave:;
union syn_cache_sa src;
union syn_cache_sa dst;
+ KASSERT(tp->t_state == TCPS_LISTEN);
+
memset(&src, 0, sizeof(src));
memset(&dst, 0, sizeof(dst));
switch (af) {