Kernel/Net: Implement SO_REUSEADDR socket option storage#26517
Kernel/Net: Implement SO_REUSEADDR socket option storage#26517po-nuvai wants to merge 1 commit intoSerenityOS:masterfrom
Conversation
|
Sockets effectively can't have reuseaddr enabled at the moment (in a meaningful way), I'd argue that if an application cares enough to read back the state then that should rightfully fail. |
SO_REUSEADDR was silently ignored (printing a FIXME message but returning success). Since the actual bind() behavior to allow address reuse is not implemented, applications that set this option would be misled into thinking it works. Return ENOPROTOOPT instead to properly indicate the option is not supported, matching the behavior of other unimplemented socket options.
b4a1e1c to
85a2ea9
Compare
|
Hello! One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the |
timschumi
left a comment
There was a problem hiding this comment.
Now it's just at the state from before we added the options, which breaks all the applications that the accommodations were added for in the first place.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! |
|
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions! |
Previously SO_REUSEADDR was silently ignored (printing a FIXME message but returning success). This adds proper storage of the SO_REUSEADDR value through a member variable, making setsockopt/getsockopt work correctly.
The actual bind() behavior change to allow address reuse is not yet implemented, but this makes the option work correctly for applications that set and query the option.
Changes
m_reuse_addressmember variable to Socket class