Opened 6 years ago
Closed 6 years ago
#14312 closed bug (fixed)
getsockname(2) doesn't work if socket isn't connected
Reported by: | leorize | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Network & Internet/Stack | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
According to POSIX, getsockname is meant to "retrieve the locally-bound name of the specified socket", so it shouldn't fail if the socket is not connected.
Attached below is a toy program that describe this issue
How to run:
$ gcc -o sock sock.c -lnetwork $ ./sock
Expected:
yay
Got:
getsockname: Socket is not connected
Attachments (1)
Change History (5)
by , 6 years ago
comment:1 by , 6 years ago
patch: | 0 → 1 |
---|
comment:2 by , 6 years ago
patch: | 1 → 0 |
---|
comment:3 by , 6 years ago
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
It seems we expect this: http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/network/stack/net_socket.cpp#1066