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

implement-handling-of-ipv6-addresses-reserved-ranges #84

Merged

Conversation

lnarolski
Copy link
Collaborator

Problem statement
Currently eBPF Discovery only partially handles IPv6 addressing, that is mapped IPv4 into IPv6. Other IPv6 http requests are neglected and not counted as internal/external clients for discovered services.

Solution proposal
IpAddressNetlinkChecker::isV6AddressExternal() implement checks (check if address prefix matches the one provided) for:

  • unique local address (prefix fc00::/7)
  • site local addresses (fec0::/10 - deprecated)
  • link local addresses (fe80::/10)
  • loopback addresses (::1/128)
  • address is from the same subnet as any local ipv6 interfaces

getMappedIPv4Addr() add checks for IPv4/IPv6 translated address
check for prefixes: (::ffff:0:0:0/96) and (64:ff9b::/96) and handle as mapped IPv4/IPv6

Success criteria
IPv6 addresses are recognized as local if any of the following rules apply:

  • is unique local address
  • is site local address
  • is link local addresses
  • is loopback address
  • IPv4/IPv6 translated address are handled in the same manner as IPv4/IPv6 mapped addresses

Unit tests added for all implemented rules

@dynatrace-cla-bot
Copy link
Member

dynatrace-cla-bot commented May 6, 2024

CLA assistant check
All committers have signed the CLA.

libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
libservice/headers/service/IpAddressNetlinkChecker.h Outdated Show resolved Hide resolved
libservice/headers/service/IpAddressNetlinkChecker.h Outdated Show resolved Hide resolved
libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
libservice/src/IpAddressNetlinkChecker.cpp Outdated Show resolved Hide resolved
@lnarolski lnarolski requested a review from jakubrak May 10, 2024 07:06
@lnarolski lnarolski force-pushed the implement-handling-of-ipv6-addresses-reserved-ranges branch from ff9a8ea to 1a155a3 Compare May 27, 2024 07:06
@lnarolski lnarolski force-pushed the implement-handling-of-ipv6-addresses-reserved-ranges branch from 1a155a3 to 9f10e8f Compare May 29, 2024 13:49
@lnarolski lnarolski merged commit 501fb95 into main Jun 6, 2024
4 of 5 checks passed
@lnarolski lnarolski deleted the implement-handling-of-ipv6-addresses-reserved-ranges branch June 6, 2024 07:08
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.

4 participants