3843. [protocol] Check EDNS EXPIRE option in dns_rdata_fromwire.

[RT #35969]

(cherry picked from commit ae5335dcd9d750312a4fa455495080fcb314b9d8)
This commit is contained in:
Mark Andrews
2014-05-13 12:46:24 +10:00
parent e34ab0108a
commit 9e59e2bca4
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,6 @@
3843. [protocol] Check EDNS EXPIRE option in dns_rdata_fromwire.
[RT #35969]
3841. [cleanup] Refactor zone.c:add_opt to use dns_message_buildopt.
[RT #35924]

View File

@@ -147,6 +147,14 @@ fromwire_opt(ARGS_FROMWIRE) {
isc_region_consume(&sregion, addrbytes);
break;
}
case DNS_OPT_EXPIRE:
/*
* Request has zero length. Response is 32 bits.
*/
if (length != 0 && length != 4)
return (DNS_R_FORMERR);
isc_region_consume(&sregion, length);
break;
default:
isc_region_consume(&sregion, length);
break;