message string changes, mostly for consistency, also -32 bytes in .rodata
This commit is contained in:
@@ -76,12 +76,12 @@ uint8_t *get_option(struct dhcpMessage *packet, int code)
|
||||
length = 308;
|
||||
while (!done) {
|
||||
if (i >= length) {
|
||||
bb_error_msg("Bogus packet, option fields too long");
|
||||
bb_error_msg("bogus packet, option fields too long");
|
||||
return NULL;
|
||||
}
|
||||
if (optionptr[i + OPT_CODE] == code) {
|
||||
if (i + 1 + optionptr[i + OPT_LEN] >= length) {
|
||||
bb_error_msg("Bogus packet, option fields too long");
|
||||
bb_error_msg("bogus packet, option fields too long");
|
||||
return NULL;
|
||||
}
|
||||
return optionptr + i + 2;
|
||||
@@ -92,7 +92,7 @@ uint8_t *get_option(struct dhcpMessage *packet, int code)
|
||||
break;
|
||||
case DHCP_OPTION_OVER:
|
||||
if (i + 1 + optionptr[i + OPT_LEN] >= length) {
|
||||
bb_error_msg("Bogus packet, option fields too long");
|
||||
bb_error_msg("bogus packet, option fields too long");
|
||||
return NULL;
|
||||
}
|
||||
over = optionptr[i + 3];
|
||||
@@ -140,7 +140,7 @@ int add_option_string(uint8_t *optionptr, uint8_t *string)
|
||||
|
||||
/* end position + string length + option code/length + end option */
|
||||
if (end + string[OPT_LEN] + 2 + 1 >= 308) {
|
||||
bb_error_msg("Option 0x%02x did not fit into the packet",
|
||||
bb_error_msg("option 0x%02x did not fit into the packet",
|
||||
string[OPT_CODE]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user