Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2020 12:16:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 250366] [tcp] The ioctl of socket fd should return -1 after listen to avoid misusing.
Message-ID:  <bug-250366-227-55DdZHcgUn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-250366-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-250366-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250366

--- Comment #1 from Yong-Hao Zou <yonghaoz1994@gmail.com> ---
Sorry, the script should be

```
0   socket(..., SOCK_STREAM, IPPROTO_TCP) =3D 3
+0  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) =3D 0
+0.1 ioctl(3, FIONREAD, [0]) =3D 0

+0  bind(3, ..., ...) =3D 0
+0.1 ioctl(3, FIONREAD, [0]) =3D 0

+0  listen(3, 1) =3D 0
+0  < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
+0 ~ +1  > S. 0:0(0) ack 1 <...>

+.1 < . 1:1(0) ack 1 win 32792
+0.1  accept(3, ..., ...) =3D 4

+0 < . 1:41(40) ack 1 win 28273=20

+0.1 ioctl(4, FIONREAD, [40]) =3D 0
+0.1 ioctl(3, FIONREAD, [0]) =3D -1
```

No SIOCINQ in FreeBSD.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250366-227-55DdZHcgUn>