Differentiate between IPv4 and IPv6 NAT-1-1 addresses #2423
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the title says, this new PR tries to add some awareness in Janus about the nature of the provided address(es) for NAT-1-1 mapping purposes. At the moment, when you specify one or more addresses, they're blindly set for all candidates, independently of the protocol family: this means that if you set, for instance,
1.2.3.4
, this would be set for IPv6 candidates as well, which is clearly wrong. This new patch corrects that, and ensures that a NAT-1-1 address is only enforced if it's the same family as the candidate it's being applied on.There's no change in how you configure the feature, it works exactly the same way: it's Janus that will look at the address(es) you pass, and figures out if they're IPv4 or IPv6 to handle them accordingly.
I tested this in several scenarios and it seems to be working, but of course I encourage you to test this carefully, especially if you're using the NAT-1-1 feature a lot (e.g., deploying on AWS, Azure, or other cloud providers). If I don't get any feedback, I plan to merge this relatively soon.