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 ipv6 masking #635

Merged

Conversation

ArnoStiefvater
Copy link
Member

@ArnoStiefvater ArnoStiefvater commented Jan 8, 2021

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 compilers
anymore which resulted in not clearing anything if the prefix was a multiple of 32 on some compilation configurations.

v6_is_local_ip() and v6_routethrough() are now using the new function.

Why:

Fixing bug, improving code.

How:

Added tests.

Checklist:

Original ipv6addrmask() has several limitations
and bugs. It only had a byte size resolution.
E.g. masking with /124 yielded an erroneous result.
It included some hacky way of clearing an uint32_t
which seems to be not supported with modern compilers
anymore which resulted in not clearing anything if
the prefix was a multiple of 32 on some compilation
configurations.
Replace call off erroneous function with call to
new function.
Replace call off erroneous function with call to
new function.
@ArnoStiefvater ArnoStiefvater merged commit fe140e4 into greenbone:openvas-20.08 Jan 11, 2021
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

2 participants