diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-10-19 09:37:52 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-10-19 09:37:52 +0000 |
commit | 2043307751112834c9e2c0d1201a38aed095a6da (patch) | |
tree | 36496ff12d043799c0e1c3d3460d37195c6771e6 /sys/netinet | |
parent | 22847b1b84ee37198dce444c364efdc4017f93f2 (diff) | |
download | FreeBSD-src-2043307751112834c9e2c0d1201a38aed095a6da.zip FreeBSD-src-2043307751112834c9e2c0d1201a38aed095a6da.tar.gz |
Convert if (tp->t_state == TCPS_LISTEN) panic() into a KASSERT.
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 82a60db..7e2eba4 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1010,10 +1010,8 @@ after_listen: KASSERT(headlocked, ("tcp_input: after_listen: head not locked")); INP_LOCK_ASSERT(inp); - /* XXX temp debugging */ - /* should not happen - syncache should pick up these connections */ - if (tp->t_state == TCPS_LISTEN) - panic("tcp_input: TCPS_LISTEN"); + /* Syncache takes care of sockets in the listen state. */ + KASSERT(tp->t_state != TCPS_LISTEN, ("tcp_input: TCPS_LISTEN")); /* * This is the second part of the MSS DoS prevention code (after diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 82a60db..7e2eba4 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -1010,10 +1010,8 @@ after_listen: KASSERT(headlocked, ("tcp_input: after_listen: head not locked")); INP_LOCK_ASSERT(inp); - /* XXX temp debugging */ - /* should not happen - syncache should pick up these connections */ - if (tp->t_state == TCPS_LISTEN) - panic("tcp_input: TCPS_LISTEN"); + /* Syncache takes care of sockets in the listen state. */ + KASSERT(tp->t_state != TCPS_LISTEN, ("tcp_input: TCPS_LISTEN")); /* * This is the second part of the MSS DoS prevention code (after |