Skip to content

Add: Host discovery for large IPv6 networks#2163

Merged
jjnicola merged 4 commits intomainfrom
host-discovery-ipv6
Mar 23, 2026
Merged

Add: Host discovery for large IPv6 networks#2163
jjnicola merged 4 commits intomainfrom
host-discovery-ipv6

Conversation

@jjnicola
Copy link
Member

@jjnicola jjnicola commented Mar 13, 2026

What:
With this patch, the host discovery for large ipv6 networks is introduced together with a new alive test method (int 32).
Instead of creating a host list from an IPv6 network address and mask (e.g. 5858::0/64), which would take years to scan and it would consume all the RAM, it just call a new function in gvm-libs to perform an ICMPv6 to a multicast IPv6 address (ff02::1).
Later, the found host are set as target and they will be handle as before. To avoid a double alive test, they are just considered alive.

For now, it only supports only one IPv6 network address. This means it can not be combined with other networks or unicast addresses.

Also, it is required that the local network has ICMPv6 enabled, otherwise the discovery won't work.

Jira: SC-1574

Why:

How:

Checklist:

  • Tests
  • PR merge commit message adjusted

@jjnicola jjnicola requested a review from a team as a code owner March 13, 2026 15:06
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
  • ⚠️ 1 packages with OpenSSF Scorecard issues.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 5fa5275.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
cargo/cidr 0.3.2 🟢 3.1
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Packaging⚠️ -1packaging workflow not detected
SAST⚠️ 0no SAST tool detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
cargo/ipnet 2.12.0 ⚠️ 2.8
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ -1No tokens found
Code-Review🟢 3Found 7/22 approved changesets -- score normalized to 3
Maintained⚠️ 22 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow⚠️ -1no workflows found
Pinned-Dependencies⚠️ -1no dependencies found
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
Security-Policy⚠️ 0security policy file not detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • rust/Cargo.lock

@github-actions github-actions bot added the minor_release creates a minor release label Mar 13, 2026
@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from 91f7d33 to bf1b300 Compare March 16, 2026 12:14
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 16, 2026
nichtsfrei
nichtsfrei previously approved these changes Mar 16, 2026
With this patch, the host discovery for large ipv6 networks is introduced together with a new alive test method (int 32).
Instead of creating a host list from an IPv6 network address and mask (e.g. 5858::0/64), which would take years to scan and it woudl consume all the RAM, it just call a new function in gvm-libs to perform an ICMPv6 to a multicast IPv6 address (ff02::1).
Later, the found host are set as target and they will be handle as before. To avoid a double alive test, they are just considered alive.

For now, it only supports only one IPv6 network address. This means it can not be combined with other networks or unicast addresses.

Also, it is required that the local network has ICMPv6 enabled, otherwise the discovery won't work.
@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from bf1b300 to 2d5a712 Compare March 18, 2026 16:25
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 18, 2026
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 18, 2026
@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from 4592f5b to ed4d8e6 Compare March 18, 2026 17:25
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 18, 2026
@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from ed4d8e6 to 0c5cae4 Compare March 20, 2026 13:08
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 20, 2026
@jjnicola
Copy link
Member Author

It depends on greenbone/gvm-libs#1058

@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from 0c5cae4 to ce7e389 Compare March 20, 2026 18:07
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 20, 2026
@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from ce7e389 to 8307490 Compare March 23, 2026 11:45
@jjnicola jjnicola requested review from Kraemii and nichtsfrei March 23, 2026 11:45
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 23, 2026
…mentation

To test this, try with the following command

sudo target/debug/scannerctl alivetest --hostdiscovery -t 5858:0:0:0:0:0:1:0/124 -v

Ensure you added the IP and network to your local host and ensure there are other alive hosts in the same network. You can try with subnets as well
@jjnicola jjnicola force-pushed the host-discovery-ipv6 branch from 8307490 to 5fa5275 Compare March 23, 2026 12:01
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Mar 23, 2026
@jjnicola jjnicola merged commit 0eec937 into main Mar 23, 2026
35 of 36 checks passed
@jjnicola jjnicola deleted the host-discovery-ipv6 branch March 23, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor_release creates a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants