summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorJeffrey Hsu <hsu@FreeBSD.org>2002-06-12 03:11:06 +0000
committerJeffrey Hsu <hsu@FreeBSD.org>2002-06-12 03:11:06 +0000
commit73dca2078d1b0aa6c93a54b4f1d4183bdf42c8fe (patch)
tree1a225fa2ec5fd491e463d2dd6b1e55d959d10d0b /sys/netinet/tcp_subr.c
parent3cfcc388eafd4c73fb0cd201f202fd72782285d9 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 143dbffcf656..ebb2479ea1c1 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -853,12 +853,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
for (inp = LIST_FIRST(tcbinfo.listhead), i = 0; inp && i < n;
inp = LIST_NEXT(inp, inp_list)) {
INP_LOCK(inp);
- if (inp->inp_gencnt <= gencnt) {
- if (cr_canseesocket(req->td->td_ucred,
- inp->inp_socket))
- continue;
+ if (inp->inp_gencnt <= gencnt &&
+ cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0)
inp_list[i++] = inp;
- }
INP_UNLOCK(inp);
}
INP_INFO_RUNLOCK(&tcbinfo);