Skip to content

Conversation

@bonktree
Copy link
Contributor

This function takes two arguments, an IPv6 address and a prefix with length, and checks that this address is, in fact, in this prefix.

We also add a hopefully complete enough set of tests.

It has analogous semantics to ipv4_ip_subnet; the name is different because the word "subnet" does not really fit to universally describe an address range with common leading bits; many prefixes can be used to number a single subnet, a prefix might not correspond to a particular subnet at all (esp. with DHCP Prefix Delegation), etc. There's a short note on that in the doc page.

This function takes two arguments, an IPv6 address and a prefix with
length, and checks that this address is in this prefix.

We also add a hopefully decently complete set of tests.

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
@legionus legionus merged commit 840f8b5 into legionus:master Aug 24, 2025
6 checks passed
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.

2 participants