Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SetSendTimeout/SetReceiveTimeout #1012

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

robmry
Copy link
Contributor

@robmry robmry commented Aug 30, 2024

Before #793, netlink sockets were blocking.

Send/receive timeouts were implemented using SO_SNDTIMEO/SO_RCVTIMEO on the socket descriptor. But, that doesn't work now the socket is non-blocking.

Instead, set deadlines on the file read/write.

@robmry robmry marked this pull request as draft August 30, 2024 19:07
@robmry robmry force-pushed the fixes_for_nonblocking_sockets branch 2 times, most recently from 42fff99 to 592a422 Compare August 30, 2024 19:27
nl/nl_linux.go Outdated Show resolved Hide resolved
nl/nl_linux_test.go Outdated Show resolved Hide resolved
@robmry robmry force-pushed the fixes_for_nonblocking_sockets branch from 592a422 to 93162b8 Compare August 30, 2024 21:33
@robmry robmry marked this pull request as ready for review August 30, 2024 21:39
@robmry robmry force-pushed the fixes_for_nonblocking_sockets branch from 93162b8 to 3c3e5c7 Compare September 3, 2024 17:36
They were implemented using SO_SNDTIMEO/SO_RCVTIMEO on the
socket descriptor - but that doesn't work now the socket is
non-blocking. Instead, set deadlines on the file read/write.

Signed-off-by: Rob Murray <rob.murray@docker.com>
@robmry robmry force-pushed the fixes_for_nonblocking_sockets branch from 3c3e5c7 to 6e8c519 Compare September 3, 2024 17:44
@robmry
Copy link
Contributor Author

robmry commented Sep 4, 2024

I'm not sure who needs to review this ... @aboch, could you take a look?

@aboch aboch merged commit e194da5 into vishvananda:main Sep 4, 2024
2 checks passed
robmry added a commit to robmry/moby that referenced this pull request Oct 7, 2024
…93d350

- Preserve results when NLM_F_DUMP_INTR is set
  vishvananda/netlink#1018
- Fix SetSendTimeout/SetReceiveTimeout
  vishvananda/netlink#1012

full diff: vishvananda/netlink@v1.3.0...084abd9

Signed-off-by: Rob Murray <rob.murray@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants