Skip to content
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

Fix: demand PROXY protocol header for every UDP packet #12

Merged
merged 2 commits into from Sep 17, 2020

Conversation

TrueBrain
Copy link
Member

And not, as by default, for every UDP stream.

Upstream proxies can be configured to behave like this, where
they create a new UDP stream for every UDP packet they receive.

The current code made it possible for a user to send its own
PROXY protocol header after the first packet, making it possible
for us to start querying random IP/port combinations. The fix was
either changing the upstream proxy (which we did) or make this code
follow streams, add timeouts on the streams to forget about them,
and make sure this is in sync with the upstream proxy. This is
a very difficult task, as with UDP no state is transmitted from
the upstream proxy to us (like with TCP). So the first option is
a lot easier, a lot less code, and less likely to break.

And not, as by default, for every UDP stream.

Upstream proxies can be configured to behave like this, where
they create a new UDP stream for every UDP packet they receive.

The current code made it possible for a user to send its own
PROXY protocol header after the first packet, making it possible
for us to start querying random IP/port combinations. The fix was
either changing the upstream proxy (which we did) or make this code
follow streams, add timeouts on the streams to forget about them,
and make sure this is in sync with the upstream proxy. This is
a very difficult task, as with UDP no state is transmitted from
the upstream proxy to us (like with TCP). So the first option is
a lot easier, a lot less code, and less likely to break.
…lopment

The values are not relevant, as the local dynamodb will completely
ignore it. But they do need to be set before the code actually
works.
Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit.

@TrueBrain TrueBrain merged commit 6a01e31 into OpenTTD:master Sep 17, 2020
@TrueBrain TrueBrain deleted the drop_mapping branch September 17, 2020 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants