-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
upstream_bind_config does not work with UDP. (Connected to #15516) #15590
Comments
The issue is that udp_proxy requires a different source port for every "session" (downstream IP/port) in order to correctly associate upstream datagrams with the right downstream client. I'm not sure what bind config actually means in this case. Would you want to just use the IP part of the bind config and not the port? |
@mattklein123
The opposite. We want to use the port part of the bind config mostly. In our case for every new udp session a simple control plane creates a new WDYT? Could this work anytime? |
I see, OK, thanks. I think it's probably fine to support bind config with the clearly documented understanding that it can only work with a single session. I will leave this marked as help wanted. I'm not sure when I will be able to get to this but can help someone work through it if they are interested. |
This issue was opened because @mattklein123 asked to do it in #15516
Using
upstream_bind_config
field with UDP doesn't seem to work.Repro steps + Config:
Tested the following config with a socat UDP sender sending datagrams to
127.0.0.1:1234
, and socat receiver listening at127.0.0.1:1235
My full static config is:
upstream_bind_config_test.txt
Expectation:
The expectation was to bind the outgoing connection's source to
127.0.0.2:9999
, but it did not happen. socat recv accepted connection from a randomly chosen port at127.0.0.1
by envoy.2021/03/17 14:10:30 socat[28284] N accepting UDP connection from AF=2 127.0.0.1:51755
Note:
The same
upstream_bind_config
configuration works well with HTTP, as you would expect.@mattklein123 as you mentioned that
May I ask for a deeper explanation on this topic?
The text was updated successfully, but these errors were encountered: