IPv6 support for -g, --generate#376
Merged
auerswal merged 3 commits intoschweikert:developfrom Feb 15, 2025
Merged
Conversation
358e61c to
3c2b44e
Compare
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.
Collaborator
Author
|
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 |
gsnw-sebast
approved these changes
Feb 15, 2025
Collaborator
gsnw-sebast
left a comment
There was a problem hiding this comment.
I have tested it and it works without any complaints
Collaborator
Author
|
Thanks for the reviews, I'll merge this shortly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.