-
-
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
nut-scanner network scans should provide a "-m auto" option #2244
Comments
I think this logic could be already done in 42ity fork? port-back is still piecemeal and pending for the bigger features (for diligent separated reviewability and bug dissection). |
I told myself the same 42ITy, but not sure. IIRC, it's uses libcidr and I don't want such deps. For now, in HA SmartNUT add-on, found a clean workaround ;) (bashio returns exactly what is expected) |
BTW, what is wrong with libcidr? :) Not that it's hard to parse a few string patterns and do bit maths ourselves... |
FWIW, I've recently had another pass at porting stuff from the FTY fork and checking the remaining differences (by now two big things are packaging recipes and DMF, and also There were no mentions of So here your issue is indeed new and pristine after all, with the challenging part being about portably detecting what non-loopback IP address(es) we have at disposal on the current system, with what netmasks, and checking perhaps all of the resulting ranges (if there's more than one). |
…}: report the IP address (range, single, none) in the log [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…pstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…roper support [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…ions [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
… options and others behave differently without them [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
… introduce a way to scan several IP address ranges [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…on-threaded scans too [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…etworkupstools#2244] We actually use DEFAULT_NETWORK_TIMEOUT from common.h same as in clients/upsclient.c Signed-off-by: Jim Klimov <[email protected]>
…scans do not parallelize together [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…}: report the IP address (range, single, none) in the log [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…pstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…roper support [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…ions [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
… options and others behave differently without them [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
… introduce a way to scan several IP address ranges [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…on-threaded scans too [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…etworkupstools#2244] We actually use DEFAULT_NETWORK_TIMEOUT from common.h same as in clients/upsclient.c Signed-off-by: Jim Klimov <[email protected]>
…scans do not parallelize together [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…scans do not parallelize together [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…for debug printouts to be predictable on different platforms [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…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]>
… 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]>
…orkupstools#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
…nts [networkupstools#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
… comments [networkupstools#2244, networkupstools#2511] 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]>
… comments [networkupstools#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
…#2244, networkupstools#2511] Signed-off-by: Jim Klimov <[email protected]>
…ting for `-m auto` [networkupstools#2244, networkupstools#2516] Signed-off-by: Jim Klimov <[email protected]>
…an`, version bumped [networkupstools#2244, networkupstools#2523 et al] Signed-off-by: Jim Klimov <[email protected]>
…warn if none were chosen [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…warn if none were chosen [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…ll getifaddr() related methods [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…ll getifaddr() related methods [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
…ll getifaddr() related methods [networkupstools#2244] Signed-off-by: Jim Klimov <[email protected]>
when scanning network devices (SNMP, XML, NUT), nut-scanner should provide a "-m auto" option to automatically provide the local network information.
Example: when your IP is 192.168.1.1 on a class C network, "-m auto" should be equivalent to "-m 192.168.1.1/24"
The text was updated successfully, but these errors were encountered: