Skip to content

Conversation

@smortex
Copy link
Contributor

@smortex smortex commented Dec 31, 2022

RFC4291 define the Link-local unicast range as fe80::/10, not fe80::/16 (what we compared against because of the String comparison). As a consequence, some Link-local unicast addresses where not correctly filtered, e.g. fe87::.

While here, add a "working" example with an actual global IPv6 address from the 2001:0DB8::/32 range reserved for documentation (RFC3849).

@smortex smortex requested a review from a team as a code owner December 31, 2022 02:42
@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@smortex smortex changed the title Rework the way we filter ignored IP addresses Fix IPv6 link-local unicast address filtering Dec 31, 2022
@smortex smortex force-pushed the fix-ipv6-link-local-unicast-address-filtering branch 2 times, most recently from 791b033 to 78a558d Compare December 31, 2022 02:52
@smortex smortex changed the title Fix IPv6 link-local unicast address filtering (FACT-3171) Fix IPv6 link-local unicast address filtering Dec 31, 2022
@smortex smortex force-pushed the fix-ipv6-link-local-unicast-address-filtering branch from 78a558d to ca8d6d0 Compare January 3, 2023 19:29
@joshcooper
Copy link
Contributor

@smortex we just merged some changes to address the test failures. If you rebase onto d3447d7 I think your PR will pass

Instead of String comparison, check if IP addresses are included into
the ignored ranges.

No functional change.
RFC4291 define the Link-local unicast range as fe80::/10, not fe80::/16.
As a consequence some Link-local unicast addresses where not correctly
filtered, e.g. fe87::.

While here, add a "working" example with an actual global IPv6 address
from the 2001:0DB8::/32 range reserved for documentation (RFC3849).
@smortex smortex force-pushed the fix-ipv6-link-local-unicast-address-filtering branch from ca8d6d0 to c273b76 Compare January 5, 2023 23:23
@smortex
Copy link
Contributor Author

smortex commented Jan 6, 2023

Awesome! Thanks for the head-up!

Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

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

Looks correct to me based on https://www.rfc-editor.org/rfc/rfc4291.html#section-2.4

      Link-Local unicast   1111111010           FE80::/10       2.5.6

and https://www.rfc-editor.org/rfc/rfc5735.html#section-3

169.254.0.0/16 - This is the "link local" block. As described in
[RFC3927], it is allocated for communication between hosts on a
single link. Hosts obtain these addresses by auto-configuration,
such as when a DHCP server cannot be found.

@joshcooper joshcooper merged commit 70328b0 into puppetlabs:main Jan 6, 2023
@smortex smortex deleted the fix-ipv6-link-local-unicast-address-filtering branch January 6, 2023 17:42
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.

3 participants