-
Notifications
You must be signed in to change notification settings - Fork 22
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
sockaddr prefix in write payload #84
Comments
How does Unix-DCO deal with this? Send CC messages directly over the socket, hand over peer ID, or sockaddr? @schwabe? |
My understanding is that in Linux socket descriptor is shared between user/kernel. For instance, userspace calls |
Correct: Linux userspace does not even know there is DCO when reading/writing CC packets. Everything happens over the socket as usual. It's DCO in kernel that does some magic to make this happen transparently. (Originally we used netlink, but we dropped that approach) |
@lstipakov why not using just the peer ID instead of the whole sockaddr? |
Because there might be no peers yet when CC messages are exchanged. |
In multipeer UDP mode, we expect userspace to prepend CC packets with SOCKADDR to know where to send the control packet. Likewise, when we receive the control packet, we prepend it with remote SOCKADDR before pushing to userspace. OpenVPN#84 Co-authored-by: Leon Dang <[email protected]> Signed-off-by: Leon Dang <[email protected]> Signed-off-by: Lev Stipakov <[email protected]>
In that case there is only the server socket open. Is that under win-dco control? |
Yep, the socket exist only in the driver and is controlled by the driver via Winsock Kernel API. Userspace can read/write by using standard IO API on the driver handle. The driver handles IO requests and proxies them to the socket. |
Ok, I thought this happened only for peer sockets, but in UDP it's just the same |
In MP mode, the driver doesn't know to which peer it should send CC message. For that, userspace prepends the write payload with the sockaddr, containing the address of the remote peer. DCO passes this to WskSendMessages/WskSendTo.
The text was updated successfully, but these errors were encountered: