Skip to content

IPv6 support for -g, --generate#376

Merged
auerswal merged 3 commits intoschweikert:developfrom
auerswal:ipv6-gen
Feb 15, 2025
Merged

IPv6 support for -g, --generate#376
auerswal merged 3 commits intoschweikert:developfrom
auerswal:ipv6-gen

Conversation

@auerswal
Copy link
Collaborator

No description provided.

@auerswal auerswal force-pushed the ipv6-gen branch 2 times, most recently from 358e61c to 3c2b44e Compare January 19, 2025 16:31
@auerswal auerswal linked an issue Jan 19, 2025 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jan 19, 2025

Coverage Status

coverage: 87.685% (+0.07%) from 87.611%
when pulling 7e69b78 on auerswal:ipv6-gen
into 511aa37 on schweikert:develop.

Before, "fping -6 -g IPv4_ADDR_SPEC" would generate all requested
IPv4 addresses and try to add them to the host table, but that
would fail because of address family mismatch.

Now, "fping -6 -g IPv4_ADDR_SPEC" detects the problem before
generating any addresses, and fails early.

Mixing IPv4 and IPv6 addresses when using -g START END is detected
before generating any addresses and fails early, too.
This creates a code structure suitable to add IPv6 versions
of the functions used to generate addresses.
The limit for generated addresses is increased by two to
allow /111 IPv6 prefixes similar to /15 IPv4 prefixes.

The implementation uses two unsigned 64 bit integers to
represent a single IPv6 address.  The required arithmetic
is open-coded and limited to what is needed to implement
IPv6 support for -g, --generate.

This addresses GitHub issue schweikert#59.
@auerswal
Copy link
Collaborator Author

auerswal commented Feb 1, 2025

I have change the IPv6 generator code to not exclude the Subnet-Router anycast address when using CIDR format, and rebased the branch on top of develop.

Copy link
Owner

@schweikert schweikert left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

Copy link
Collaborator

@gsnw-sebast gsnw-sebast left a comment

Choose a reason for hiding this comment

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

I have tested it and it works without any complaints

@auerswal
Copy link
Collaborator Author

Thanks for the reviews, I'll merge this shortly.

@auerswal auerswal merged commit 57d91b1 into schweikert:develop Feb 15, 2025
8 of 9 checks passed
@auerswal auerswal deleted the ipv6-gen branch February 15, 2025 19:03
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.

Please allow -g at least for smaller IPv6 ranges

4 participants