From fb49ca7188459d6cc2fe28339cf8dab84131ab5a Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 4 Jul 2024 17:12:26 +0200 Subject: [PATCH] tools/nut-scanner/nut-scanner.c: comment some TODO for IPv6 netmask proper support [#2244] Signed-off-by: Jim Klimov --- tools/nut-scanner/nutscan-ip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/nut-scanner/nutscan-ip.c b/tools/nut-scanner/nutscan-ip.c index 4223bfa868..9b173d56c5 100644 --- a/tools/nut-scanner/nutscan-ip.c +++ b/tools/nut-scanner/nutscan-ip.c @@ -267,6 +267,7 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) char * mask; char * saveptr = NULL; nutscan_ip_iter_t ip; + /* TODO: There can be up to 128-bit CIDR mask for IPv6... */ int mask_val; int mask_byte; int ret; @@ -302,6 +303,7 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) upsdebugx(5, "%s: parsed cidr=%s into first_ip=%s and mask=%s", __func__, cidr, first_ip, mask); + /* TODO: check if mask is also an IP address or a bit count */ mask_val = atoi(mask); upsdebugx(5, "%s: parsed mask value %d", __func__, mask_val);