Bug 285315 - The target address passed is not ignored when the socket is in a connected state
Summary: The target address passed is not ignored when the socket is in a connected state
Status: Closed DUPLICATE of bug 285316
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.1-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-11 00:30 UTC by nakayamakenjiro
Modified: 2025-03-11 02:32 UTC (History)
0 users

See Also:


Attachments
A patch to ignore the validation for target address when connected (1.23 KB, application/mbox)
2025-03-11 00:30 UTC, nakayamakenjiro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description nakayamakenjiro 2025-03-11 00:30:05 UTC
Created attachment 258546 [details]
A patch to ignore the validation for target address when connected

As per send(2) - https://man.freebsd.org/cgi/man.cgi?query=send, it says:

'''
If the  socket  is in  a  connected  state, the target address passed to
sendto(), sendmsg() or sendmmsg() is ignored.
'''

However, the the target address is not ignored.
It seems that udp_send() has the validation. The attached patch can ignore the target address. But is it a wrong man page or wrong validation?

Just FYI, Linux (6.12.10-100.fc40.x86_64) ignores the target address with a socket in a connected state so an application with same code did not work.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-03-11 02:32:10 UTC
*** This bug has been marked as a duplicate of bug 285316 ***