mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
Check EDNS ZONEVERSION when parsing OPT record
This commit is contained in:
@@ -102,7 +102,6 @@
|
|||||||
#define DNS_MESSAGEEXTFLAG_DO 0x8000U
|
#define DNS_MESSAGEEXTFLAG_DO 0x8000U
|
||||||
|
|
||||||
/*%< EDNS0 extended OPT codes */
|
/*%< EDNS0 extended OPT codes */
|
||||||
|
|
||||||
#define DNS_OPT_LLQ 1 /*%< LLQ opt code */
|
#define DNS_OPT_LLQ 1 /*%< LLQ opt code */
|
||||||
#define DNS_OPT_UL 2 /*%< UL opt code */
|
#define DNS_OPT_UL 2 /*%< UL opt code */
|
||||||
#define DNS_OPT_NSID 3 /*%< NSID opt code */
|
#define DNS_OPT_NSID 3 /*%< NSID opt code */
|
||||||
@@ -129,7 +128,7 @@
|
|||||||
* options we know about. Extended DNS Errors may occur multiple times, see
|
* options we know about. Extended DNS Errors may occur multiple times, see
|
||||||
* DNS_EDE_MAX_ERRORS.
|
* DNS_EDE_MAX_ERRORS.
|
||||||
*/
|
*/
|
||||||
#define DNS_EDNSOPTIONS 8 + DNS_EDE_MAX_ERRORS
|
#define DNS_EDNSOPTIONS 9 + DNS_EDE_MAX_ERRORS
|
||||||
|
|
||||||
#define DNS_MESSAGE_REPLYPRESERVE (DNS_MESSAGEFLAG_RD | DNS_MESSAGEFLAG_CD)
|
#define DNS_MESSAGE_REPLYPRESERVE (DNS_MESSAGEFLAG_RD | DNS_MESSAGEFLAG_CD)
|
||||||
#define DNS_MESSAGEEXTFLAG_REPLYPRESERVE (DNS_MESSAGEEXTFLAG_DO)
|
#define DNS_MESSAGEEXTFLAG_REPLYPRESERVE (DNS_MESSAGEEXTFLAG_DO)
|
||||||
|
@@ -266,6 +266,21 @@ fromwire_opt(ARGS_FROMWIRE) {
|
|||||||
}
|
}
|
||||||
isc_region_consume(&sregion, length);
|
isc_region_consume(&sregion, length);
|
||||||
break;
|
break;
|
||||||
|
case DNS_OPT_ZONEVERSION:
|
||||||
|
if (length == 0) {
|
||||||
|
/* Request */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* Labels and Type */
|
||||||
|
if (length < 2) {
|
||||||
|
return DNS_R_OPTERR;
|
||||||
|
}
|
||||||
|
/* Type 0 (serial), length is 6. */
|
||||||
|
if (sregion.base[1] == 0 && length != 6) {
|
||||||
|
return DNS_R_OPTERR;
|
||||||
|
}
|
||||||
|
isc_region_consume(&sregion, length);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
isc_region_consume(&sregion, length);
|
isc_region_consume(&sregion, length);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user