Closed cheina97 closed 10 months ago
Hi @stapelberg, I've left a commit with the fixes you asked for. If it is ok I can squash the commits.
Thanks! Merged as commit https://github.com/google/nftables/commit/33ee8df9d8e2cbe47a998c97fe6b842cf00b324a with slight adjustments in naming/documentation.
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)