Module Name:    src
Committed By:   rmind
Date:           Thu May 22 00:28:32 UTC 2014

Modified Files:
        src/sys/netinet: tcp_usrreq.c

Log Message:
tcp_usrreq: fix the previous - the assert is still not true (but PRU_SENSE
case will handle it); eventually, pr_usrreq should not be called without
PCB attached.


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/sys/netinet/tcp_usrreq.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_usrreq.c
diff -u src/sys/netinet/tcp_usrreq.c:1.176 src/sys/netinet/tcp_usrreq.c:1.177
--- src/sys/netinet/tcp_usrreq.c:1.176	Wed May 21 18:41:43 2014
+++ src/sys/netinet/tcp_usrreq.c	Thu May 22 00:28:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_usrreq.c,v 1.176 2014/05/21 18:41:43 rmind Exp $	*/
+/*	$NetBSD: tcp_usrreq.c,v 1.177 2014/05/22 00:28:32 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.176 2014/05/21 18:41:43 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.177 2014/05/22 00:28:32 rmind Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -250,7 +250,9 @@ tcp_usrreq(struct socket *so, int req, s
 		return EAFNOSUPPORT;
 	}
 	KASSERT(!control || (req == PRU_SEND || req == PRU_SENDOOB));
-
+#ifdef INET6
+	/* XXX: KASSERT((inp != NULL) ^ (in6p != NULL)); */
+#endif
 	/*
 	 * When a TCP is attached to a socket, then there will be
 	 * a (struct inpcb) pointed at by the socket, and this
@@ -265,9 +267,6 @@ tcp_usrreq(struct socket *so, int req, s
 		error = EINVAL;
 		goto release;
 	}
-#ifdef INET6
-	KASSERT((inp != NULL) ^ (in6p != NULL));
-#endif
 #ifdef INET
 	if (inp) {
 		tp = intotcpcb(inp);

Reply via email to