Opened 4 months ago

Last modified 4 months ago

#15081 new bug

listen() causes a socket to be "connected"

Reported by: leorize Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Network & Internet/TCP Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


Calling listen() will assign a peer to the socket, where as no connection has been accepted yet.

The demo below will describe the problem. To run:

$ gcc -o peerless -lnetwork peerless.c
$ ./peerless

Expected result:

Exit code 0, no output


Expected ENOTCONN, got 0

Attachments (1)

peerless.c (767 bytes ) - added by leorize 4 months ago.

Download all attachments as: .zip

Change History (3)

by leorize, 4 months ago

Attachment: peerless.c added

comment:1 by korli, 4 months ago

Is it really different from #2967?

comment:2 by leorize, 4 months ago

Is it really different from #2967?

Yea, that bug revolves around connect().

Note: See TracTickets for help on using tickets.