1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

Merge pull request #18625 from nmeum/pr/dhcp-zero-opt

dhcpv6: don't treat zero option as an end-of-payload marker
This commit is contained in:
benpicco 2022-09-23 04:50:28 +02:00 committed by GitHub
commit 04b7ea59fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1017,10 +1017,6 @@ static bool _parse_reply(uint8_t *rep, size_t len, uint8_t request_type)
default:
break;
}
/* 0 option is used as an end marker, len can include bogus bytes */
if (!byteorder_ntohs(opt->type)) {
break;
}
}
if ((cid == NULL) || (sid == NULL)) {
DEBUG("DHCPv6 client: ADVERTISE does not contain either server ID "
@ -1080,10 +1076,6 @@ static bool _parse_reply(uint8_t *rep, size_t len, uint8_t request_type)
default:
break;
}
/* 0 option is used as an end marker, len can include bogus bytes */
if (!byteorder_ntohs(opt->type)) {
break;
}
}
return true;
}