cache: optimize cname TTL

This commit is contained in:
Nick Peng
2022-02-17 23:15:11 +08:00
parent 0652316e98
commit d7d7ef48cd
4 changed files with 52 additions and 3 deletions

View File

@@ -68,6 +68,7 @@ typedef enum dns_type {
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_ALL = 255
} dns_opt_code_t;
@@ -171,6 +172,13 @@ struct dns_opt_ecs {
unsigned char addr[DNS_RR_AAAA_LEN];
};
/* OPT COOLIE */
struct dns_opt_cookie {
char server_cookie_len;
unsigned char client_cookie[8];
unsigned char server_cookie[32];
};
/* OPT */
struct dns_opt {
unsigned short code;