-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Teach nut-scanner -m auto*/ADDRLEN
modes
#2517
Conversation
…parate method [networkupstools#2244] Allow for some shorter indentation Signed-off-by: Jim Klimov <[email protected]>
…un-indent it some more [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
Testing erroneous-input checking:
UPDATE: Using
|
…workupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…intouts [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…overed subnets are filtered out [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…ict, NEWS.adoc: handle_arg_cidr(): add `-m auto*/ADDRLEN` mode [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
… "arg_addr" [networkupstools#2244] Avoid warning about clash with a global variable. Fallout of refactoring original code into a method. Also make it `const` as we do not change the original value anyway. Signed-off-by: Jim Klimov <[email protected]>
… subnet by family before checking for mask length [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…() not atoi() [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…t atol() [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
✅ Build nut 2.8.2.1889-master completed (commit fc5e3466ed by @jimklimov) |
… before we declare vars and types Signed-off-by: Jim Klimov <[email protected]>
… ip_range_t definition into header [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
… for ip_ranges[] list and helper metadata, and methods as part of libnutscan [networkupstools#2244, networkupstools#2511] Not bumping library version, because it was recently bumped as part of other PRs about this issue. Technically the scope of the library has been changed by new exported methods and header lines. Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
Exposed the code for IP range lists tracking as part of |
❌ Build nut 2.8.2.1895-master failed (commit 0488fac52f by @jimklimov) |
…/cidr IPs [networkupstools#2519] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
….3 man pages Signed-off-by: Jim Klimov <[email protected]>
…orkupstools#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
…nts [networkupstools#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
… comments [networkupstools#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
Follow-up for PRs #2509 and #2513, of issue #2244.
This PR adds a way to constrain the scan amounts in discovered subnets by specifying the bit-width of the host address part (e.g. in a typical IPv4
/24
subnet, that part of the option value would be32-24 = 8
=>-m auto4/8
).Also it now reports detailed reasons why this or that discovered subnet was ignored (too large, loopback, not up and running...)
Detailed "screenshot" from a test run:
And with
-m auto4/16
it did accept some of the address ranges:I've initially considered adding (also?) a mode for layman users to request the amount of scans they would tolerate, e.g.
-m auto4#200
that would translate into "200 < 256 => bit length 8 or less is okay for host address part", but per https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2 it is not too trivial - and for IPv6 support to be on par across the board, some fiddling withuint128_t
(not ubiquitous) would be needed.