diff options
| author | Jeffrey Hsu <hsu@FreeBSD.org> | 2002-06-12 03:11:06 +0000 |
|---|---|---|
| committer | Jeffrey Hsu <hsu@FreeBSD.org> | 2002-06-12 03:11:06 +0000 |
| commit | 73dca2078d1b0aa6c93a54b4f1d4183bdf42c8fe (patch) | |
| tree | 1a225fa2ec5fd491e463d2dd6b1e55d959d10d0b /sys/netinet/tcp_subr.c | |
| parent | 3cfcc388eafd4c73fb0cd201f202fd72782285d9 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_subr.c')
| -rw-r--r-- | sys/netinet/tcp_subr.c | 7 |
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); |
