envoy
envoy copied to clipboard
udp: avoid keeping UDP sockets unconnected
Signed-off-by: Xie Zhihao [email protected]
Commit Message: udp: avoid keeping UDP sockets unconnected Additional Description:
The patch fixes keeping UDP sockets unconnected and avoids exhausting UDP ports according to the issue.
# Previous
UNCONN 0 0 0.0.0.0:10000 0.0.0.0:* users:(("envoy-static",pid=875931,fd=17))
ESTAB 0 0 127.0.0.1:52082 127.0.0.1:10000 users:(("nc",pid=875966,fd=3))
UNCONN 0 0 0.0.0.0:56624 0.0.0.0:* users:(("envoy-static",pid=875931,fd=16))
ESTAB 0 0 127.0.0.1:5005 127.0.0.1:56624 users:(("nc",pid=875954,fd=3))
# Current
UNCONN 0 0 0.0.0.0:10000 0.0.0.0:* users:(("envoy-static",pid=884658,fd=17))
ESTAB 0 0 127.0.0.1:47803 127.0.0.1:10000 users:(("nc",pid=884693,fd=3))
ESTAB 0 0 127.0.0.1:53490 127.0.0.1:5005 users:(("envoy-static",pid=884658,fd=16))
ESTAB 0 0 127.0.0.1:5005 127.0.0.1:53490 users:(("nc",pid=884681,fd=3))
Since use_original_src_ip
is conflict with connect
. When use_original_src_ip
is set, connect
will not take place.
Risk Level: Low Testing: manual (have no idea to test with CI) Docs Changes: N/A Release Notes: Added Platform Specific Features: N/A Runtime guard: envoy.reloadable_features.udp_proxy_connect Fixes #21712
I think it will be better to add a runtime guard.
LGTM, except adding more comments in the code
@RyanTheOptimist for maintainer review
Looks like this needs a main merge.
/assign @mattklein123
/wait
/retest
Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit
/retest
ci fixed
Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit