From 934701941b740354d613cb1027275bd34d2415a4 Mon Sep 17 00:00:00 2001 From: Nick Peng Date: Fri, 11 Nov 2022 00:22:35 +0800 Subject: [PATCH] dns: skip padding record --- src/dns.c | 3 +++ src/dns.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/dns.c b/src/dns.c index 6c2a33f..0d712f3 100644 --- a/src/dns.c +++ b/src/dns.c @@ -1652,6 +1652,9 @@ static int _dns_decode_opt(struct dns_context *context, dns_rr_type type, unsign return -1; } } break; + case DNS_OPT_T_PADDING: + context->ptr += opt_len; + break; default: context->ptr += opt_len; tlog(TLOG_DEBUG, "DNS opt type = %d not supported", opt_code); diff --git a/src/dns.h b/src/dns.h index 812cc7c..59938f0 100644 --- a/src/dns.h +++ b/src/dns.h @@ -76,6 +76,7 @@ typedef enum dns_opt_code { DNS_OPT_T_ECS = 8, // OPT ECS DNS_OPT_T_COOKIE = 10, //OPT Cookie DNS_OPT_T_TCP_KEEPALIVE = 11, + DNS_OPT_T_PADDING = 12, DNS_OPT_T_ALL = 255 } dns_opt_code_t;