OCT 1. 删除多余代码

This commit is contained in:
huangxin 2022-11-24 14:30:14 +08:00
parent b85c2522ac
commit ff1c6b9155
1 changed files with 0 additions and 57 deletions

View File

@ -222,63 +222,6 @@ static void add_options(OBJ_DHCP_RNG pRange, data20 *optionData) {
VALUE_TO_DHCP_TLV(buff, value, DHCP_OPTION_ROUTER);
}
#if 0
for (int i = 0; i < 3; i++) {
char buff[1024];
MYBYTE hoption[256];
if (strlen(pRange.subnet) != 0 && !map_Flag[0]) {
map_Flag[0] = true;
opTag = DHCP_OPTION_NETMASK;
strcpy(value, pRange.subnet);
} else if (strlen(pRange.dnsSvr) != 0 && !map_Flag[1]) {
map_Flag[1] = true;
opTag = DHCP_OPTION_DNS;
strcpy(value, pRange.dnsSvr);
} else if (strlen(pRange.gateway) != 0 && !map_Flag[2]) {
map_Flag[2] = true;
opTag = DHCP_OPTION_ROUTER;
strcpy(value, pRange.gateway);
} else {
continue;
}
int numbytes = myTokenize(buff, value, "/,.", true);
if (numbytes > 255) {
break;
} else {
char *ptr = buff;
valSize = 0;
for (; *ptr; ptr = myGetToken(ptr, 1)) {
if (isInt(ptr)) {
hoption[valSize] = STR2INT(ptr);
valSize++;
} else {
break;
}
}
memcpy(value, hoption, valSize);
}
if (opTag == DHCP_OPTION_NETMASK && map_Flag[0]) {
optionData->mask = (*((MYDWORD *)value));
}
if (buffSize > valSize + 2) {
*dp = opTag;
dp++;
*dp = valSize;
dp++;
memcpy(dp, value, valSize);
dp += valSize;
buffSize -= (valSize + 2);
}
}
#endif
//lease
if (pRange.lease != 0) {
MYDWORD j;