Skip to content

Conversation

@secmff
Copy link

@secmff secmff commented Jan 21, 2026

Binding the udp socket to 127.0.0.1 prevents it from sending packages to outside localhost.

What does this PR do?

Binding the udp socket to 127.0.0.1 prevents it from sending packages to outside localhost. This PR allows sending data to outside of the host

Motivation

What inspired you to submit this pull request?

Related issues

A list of issues either fixed, containing architectural discussions, otherwise relevant
for this Pull Request.

Additional Notes

Anything else we should know when reviewing?

Binding the udp socket to 127.0.0.1 prevents it from sending packages
to outside localhost.
@secmff secmff requested a review from a team as a code owner January 21, 2026 08:40

tokio::select! {
conn = UdpSocket::bind("127.0.0.1:0"), if connection.is_none() => {
conn = UdpSocket::bind("0.0.0.0:0"), if connection.is_none() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I buy the motivation but what this suggests to me is that the socket for this generator and others should be default bound to localhost but configurable otherwise. I can put up a PR for that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Said PR: #1725

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.

2 participants