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

NAT: prefix test #252

Closed
wants to merge 2 commits into from
Closed

NAT: prefix test #252

wants to merge 2 commits into from

Conversation

cheina97
Copy link
Contributor

@cheina97 cheina97 commented Jan 4, 2024

This PR adds unit tests for PR #251

In particular it adds a unit test for this rule nft add rule nat prerouting ip daddr 10.0.0.0/24 dnat prefix to 20.0.0.0/24

The PR includes some utilities to get the first and last IP of a subnet (they include unit tests)

Copy link
Collaborator

@stapelberg stapelberg left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

util.go Outdated Show resolved Hide resolved
util.go Outdated Show resolved Hide resolved
util.go Outdated Show resolved Hide resolved
@cheina97 cheina97 force-pushed the frc/natprefix branch 5 times, most recently from 7c8c73a to ae1b9c8 Compare January 11, 2024 10:57
@cheina97
Copy link
Contributor Author

cheina97 commented Jan 11, 2024

Hi @stapelberg, I've left a commit with the fixes you asked for.
If it is ok I can squash the commits.

@stapelberg
Copy link
Collaborator

Thanks! Merged as commit 33ee8df with slight adjustments in naming/documentation.

@stapelberg stapelberg closed this Jan 12, 2024
@cheina97 cheina97 deleted the frc/natprefix branch January 16, 2024 16:34
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