Page MenuHomeFreeBSD

rtsock: fix socket closure.
ClosedPublic

Authored by melifaro on Jan 15 2023, 1:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 9:19 AM
Unknown Object (File)
Mar 25 2024, 4:35 AM
Unknown Object (File)
Mar 19 2024, 3:31 PM
Unknown Object (File)
Mar 19 2024, 3:14 PM
Unknown Object (File)
Mar 14 2024, 7:29 AM
Unknown Object (File)
Dec 2 2023, 2:43 PM
Unknown Object (File)
Aug 26 2023, 11:55 AM
Unknown Object (File)
Jul 5 2023, 11:55 PM
Subscribers

Details

Summary

Currently close(2) erroneously return EOPNOTSUPP for PF_ROUTE sockets. It happened after making rtsock socket implementation self-contained.

Current rtsock code marks socket as connected in rts_attach(). soclose() tries to disconnect such socket using .pr_disconnect callback.
rtsock does not implement this callback, resulting in the default method being substituted. This default method returns ENOTSUPP, failing soclose() logic.

This diff restores the previous behaviour by adding custom pr_disconnect() returning ENOTCONN.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Alexander, thanks a lot for quick fix of my mistake!

This revision is now accepted and ready to land.Jan 15 2023, 6:34 PM
This revision was automatically updated to reflect the committed changes.