Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet tcp_usrreq: fix the previous correctly - restore...
details: https://anonhg.NetBSD.org/src/rev/4ec10194a94a
branches: trunk
changeset: 329375:4ec10194a94a
user: rmind <rmind%NetBSD.org@localhost>
date: Wed May 21 18:41:43 2014 +0000
description:
tcp_usrreq: fix the previous correctly - restore the assert logic,
but move it after the PRU_SENSE check.
diffstat:
sys/netinet/tcp_usrreq.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 9e19fec12232 -r 4ec10194a94a sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c Wed May 21 15:40:52 2014 +0000
+++ b/sys/netinet/tcp_usrreq.c Wed May 21 18:41:43 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.175 2014/05/21 13:21:20 pgoyette Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.176 2014/05/21 18:41:43 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.175 2014/05/21 13:21:20 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.176 2014/05/21 18:41:43 rmind Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -249,10 +249,6 @@
splx(s);
return EAFNOSUPPORT;
}
-
-#ifdef INET6
- KASSERT((inp == NULL) || (in6p == NULL));
-#endif
KASSERT(!control || (req == PRU_SEND || req == PRU_SENDOOB));
/*
@@ -269,6 +265,9 @@
error = EINVAL;
goto release;
}
+#ifdef INET6
+ KASSERT((inp != NULL) ^ (in6p != NULL));
+#endif
#ifdef INET
if (inp) {
tp = intotcpcb(inp);
Home |
Main Index |
Thread Index |
Old Index