DHCPv4: fix MaxAddress param value

This commit is contained in:
Amin Ben Ramdhane 2020-10-10 11:11:32 +01:00
parent c6602debdd
commit 608bb009c9

View file

@ -337,7 +337,7 @@ int ipcalc(char *ip_str, char *mask_str, char *start_str, char *end_str, char *i
if (end_str) {
end = atoi(end_str);
upe.s_addr = htonl(ntohl(ups.s_addr) + end);
upe.s_addr = htonl(ntohl(ups.s_addr) + end - 1);
strcpy(ipend_str, inet_ntoa(upe));
}
return 0;