From: Mark Andrews Date: Tue, 13 May 2014 02:46:24 +0000 (+1000) Subject: 3843. [protocol] Check EDNS EXPIRE option in dns_rdata_fromwire. X-Git-Tag: v9.11.0a1~1649 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=0e338b60cdb2cf7cedb4fc17f6a14b518d1245c8;p=thirdparty%2Fbind9.git 3843. [protocol] Check EDNS EXPIRE option in dns_rdata_fromwire. [RT #35969] Conflicts: CHANGES --- diff --git a/CHANGES b/CHANGES index 899b2c26f9f..22546461b43 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Redistributable when built for 64 bit Windows. (Thanks to Giovanni Paterno.) [RT #35973] +3843. [protocol] Check EDNS EXPIRE option in dns_rdata_fromwire. + [RT #35969] + 3842. [bug] Adjust RRL log-only logging category. [RT #35945] 3841. [cleanup] Refactor zone.c:add_opt to use dns_message_buildopt. diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c index 20763967725..ae09abf71e9 100644 --- a/lib/dns/rdata/generic/opt_41.c +++ b/lib/dns/rdata/generic/opt_41.c @@ -151,13 +151,14 @@ fromwire_opt(ARGS_FROMWIRE) { isc_region_consume(&sregion, addrbytes); break; } -#ifdef notyet 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; -#endif default: isc_region_consume(&sregion, length); break;