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.
What:
Original
ipv6addrmask()
has several limitations and bugs. It only had a byte size resolution. E.g. masking with mask=124 yielded an erroneous result. It included some hacky way of clearing an uint32_t which seems to be not supported with modern compilersanymore which resulted in not clearing anything if the prefix was a multiple of 32 on some compilation configurations.
v6_is_local_ip()
andv6_routethrough()
are now using the new function.Why:
Fixing bug, improving code.
How:
Added tests.
Checklist: