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(nat): use the right addresses when nat port mapping #966

Merged
merged 1 commit into from Jun 9, 2020

Conversation

Stebalien
Copy link
Member

We switched listenAddrs from the interface addresses to the raw addresses we
were listening on. Unfortunately, we needed the resolved addresses later in the
function when resolving port mappings.

// Fall back on just using the primary interface.
//
// This should never happen, but we might as well have a fallback.
listenAddrs = finalAddrs
Copy link
Contributor

Choose a reason for hiding this comment

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

finalAddrs being used as a fallback is maybe not the best name.

Copy link
Member Author

Choose a reason for hiding this comment

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

We ended up doing this a slightly different and more efficient way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Basically, it turns out we didn't need to resolve the addresses in the first place.

We switched `listenAddrs` from the _interface_ addresses to the raw addresses we
were listening on. Unfortunately, we needed the resolved addresses later in the
function when resolving port mappings.
@aschmahmann aschmahmann merged commit 14f4ff5 into master Jun 9, 2020
@aschmahmann aschmahmann deleted the fix/nat-port-mapping branch June 9, 2020 23:06
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

3 participants