X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8e8c6cdddc6af0a1e7ebcd7fa947395b66bf1103..068f824958f4864fb9c6f03484bf470e0cb61098:/include/stg/user_ips.h diff --git a/include/stg/user_ips.h b/include/stg/user_ips.h index 8fada63b..a29e2812 100644 --- a/include/stg/user_ips.h +++ b/include/stg/user_ips.h @@ -202,7 +202,6 @@ USER_IPS ips; char * paddr; IP_MASK im; std::vector ipMask; -std::string err; if (ipsStr.empty()) { return ips; @@ -236,7 +235,6 @@ for (unsigned int i = 0; i < ipMask.size(); i++) strIp = strtok(str, "/"); if (strIp == NULL) { - err = "Incorrect IP address " + ipsStr; return ips; } strMask = strtok(NULL, "/"); @@ -244,7 +242,6 @@ for (unsigned int i = 0; i < ipMask.size(); i++) im.ip = inet_addr(strIp); if (im.ip == INADDR_NONE) { - err = "Incorrect IP address: " + std::string(strIp); return ips; } @@ -254,20 +251,17 @@ for (unsigned int i = 0; i < ipMask.size(); i++) int m = 0; if (str2x(strMask, m) != 0) { - err = "Incorrect mask: " + std::string(strMask); return ips; } im.mask = m; if (im.mask > 32) { - err = "Incorrect mask: " + std::string(strMask); return ips; } if ((im.ip & ips.CalcMask(im.mask)) != im.ip) { - err = "Address does'n match mask: " + std::string(strIp) + "/" + std::string(strMask); return ips; } }