From 0e338b60cdb2cf7cedb4fc17f6a14b518d1245c8 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 13 May 2014 12:46:24 +1000 Subject: [PATCH] 3843. [protocol] Check EDNS EXPIRE option in dns_rdata_fromwire. [RT #35969] Conflicts: CHANGES --- CHANGES | 3 +++ lib/dns/rdata/generic/opt_41.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 899b2c26f9..22546461b4 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 2076396772..ae09abf71e 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;