Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

sandbox: use Write instead of WriteTo on connected datagram sockets#159

Merged
achille-roussel merged 2 commits intomainfrom
sandbox-fix-write-to-connected-packet
Jul 1, 2023
Merged

sandbox: use Write instead of WriteTo on connected datagram sockets#159
achille-roussel merged 2 commits intomainfrom
sandbox-fix-write-to-connected-packet

Conversation

@achille-roussel
Copy link
Contributor

@achille-roussel achille-roussel commented Jul 1, 2023

This PR modifies the packet tunnel to use Write instead of WriteTo when the underlying *net.UDPConn is connected to a remote address. It addresses the error that occurred since dispatchrun/net#16 when using the pure Go resolver:

write udp 192.168.1.58:62835->172.16.0.0:49152: use of WriteTo with pre-connected connection

Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
@achille-roussel achille-roussel force-pushed the sandbox-fix-write-to-connected-packet branch from 57e35f8 to bf4a644 Compare July 1, 2023 04:55
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
@achille-roussel achille-roussel merged commit ac23c88 into main Jul 1, 2023
@achille-roussel achille-roussel deleted the sandbox-fix-write-to-connected-packet branch July 1, 2023 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants