X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fdhcpv6.c;h=cd8e43800dca33315047cd000262a5697c985be5;hp=75bc50e84e89f641f0b6f450650f86c60f1b83b3;hb=68ac18ed5d5b4c2d403396764f08c92a160b4a18;hpb=1339588a2a1143e4029a9e7558130c9b17fd6a3e diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 75bc50e..cd8e438 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -569,11 +569,7 @@ static bool dhcpv6_response_is_valid(const void *buf, ssize_t len, void *server_id = odhcp6c_get_state(STATE_SERVER_ID, &server_id_len); dhcpv6_for_each_option(&rep[1], end, otype, olen, odata) { - if ((odata + olen) > end) { - options_valid = false; - break; - } - else if (otype == DHCPV6_OPT_CLIENTID) { + if (otype == DHCPV6_OPT_CLIENTID) { clientid_ok = (olen + 4U == client_id_len) && !memcmp( &odata[-4], client_id, client_id_len); } else if (otype == DHCPV6_OPT_SERVERID) {