envoyproxy / envoyproxy/envoy

upstream_bind_config does not work with UDP. (Connected to #15516)

Open
#15,590 3 comments 0 reactions 0 assignees View on GitHub
area/udp help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
428

Description

This issue was opened because @mattklein123 [asked](https://github.com/envoyproxy/envoy/issues/15516#issuecomment-802166001) 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 at `127.0.0.1:1235`
My full static config is:
[upstream_bind_config_test.txt](https://github.com/envoyproxy/envoy/files/6175905/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 at `127.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
> The problem with bind config with a single port is it breaks session tracking

May I ask for a deeper explanation on this topic?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.