You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nut-scanner network scans should provide a "-m auto" option #2244
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).
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 docs/nut-names.txt, see #1316 for the detailed list of that effort).
There were no mentions of libcidr there, and no different code about CIDR handling, so I actually looked deeper and found nutscan-ip.c which does the related magic (including CIDR conversion to a start/end IP address pair) since your and Frederic's time. I guess we dealt with libcidr elsewhere in the 42ITy project, in some other components.
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).
Activity
jimklimov commentedon Dec 22, 2023
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).
aquette commentedon Dec 22, 2023
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)
https://github.com/aquette/addon-smartnut/blob/main/smartnut/rootfs/etc/cont-init.d/smartnut.sh#L89
jimklimov commentedon Jan 20, 2024
BTW, what is wrong with libcidr? :) Not that it's hard to parse a few string patterns and do bit maths ourselves...
jimklimov commentedon Jul 1, 2024
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
docs/nut-names.txt, see #1316 for the detailed list of that effort).There were no mentions of
libcidrthere, and no different code about CIDR handling, so I actually looked deeper and foundnutscan-ip.cwhich does the related magic (including CIDR conversion to a start/end IP address pair) since your and Frederic's time. I guess we dealt with libcidr elsewhere in the 42ITy project, in some other components.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).
76 remaining items
docs/man/nutscan_add_ip_range.txt: update wording and structure comme…
tools/nut-scanner/nutscan-ip.h: add nutscan_ip_range_list_t structure…
nut-scanner: introduce nutscan_stringify_ip_ranges() [networkupstools…
tools/nut-scanner/nut-scanner.c: add a warning comment about bit-coun…
UPGRADING.adoc: highlight API (and a bit of ABI) changes to `libnutsc…
tools/nut-scanner/nut-scanner.c: count auto-selected subnets, loudly …
tools/nut-scanner/nut-scanner.c: update build for systems that lack a…
tools/nut-scanner/nut-scanner.c: update build for systems that lack a…