diff options
author | Dave Barach <dave@barachs.net> | 2017-10-16 14:39:52 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-10-16 21:23:39 +0000 |
commit | 0cb01bde499979066389975ba81670764914cbc2 (patch) | |
tree | effb6ba9353c13672ab99a4afe9a3e9fd099c91a /src/vnet/dns/dns.h | |
parent | 0d004aaaed2fe3fc29db5e30004870f94bc7a282 (diff) |
DNS name resolver improvements
- Cache intermediate CNAME records
- Bug fixes
Change-Id: I06dcb558212fc5e9434281493c872577cf9b83e1
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/dns/dns.h')
-rw-r--r-- | src/vnet/dns/dns.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/dns/dns.h b/src/vnet/dns/dns.h index 5da26156f6c..c55c6f31934 100644 --- a/src/vnet/dns/dns.h +++ b/src/vnet/dns/dns.h @@ -32,6 +32,9 @@ typedef struct /** The name in "normal human being" notation, e.g. www.foobar.com */ u8 *name; + /** For CNAME records, the "next name" to resolve */ + u8 *cname; + /** Expiration time */ f64 expiration_time; @@ -56,6 +59,7 @@ typedef struct #define DNS_CACHE_ENTRY_FLAG_VALID (1<<0) /**< we have Actual Data */ #define DNS_CACHE_ENTRY_FLAG_STATIC (1<<1) /**< static entry */ +#define DNS_CACHE_ENTRY_FLAG_CNAME (1<<2) /**< CNAME (indirect) entry */ #define DNS_RETRIES_PER_SERVER 3 @@ -112,8 +116,9 @@ typedef enum } dns46_reply_error_t; void vnet_send_dns_request (dns_main_t * dm, dns_cache_entry_t * ep); -int vnet_dns_cname_indirection_nolock (dns_main_t * dm, - dns_cache_entry_t * ep, u8 * reply); +int +vnet_dns_cname_indirection_nolock (dns_main_t * dm, u32 ep_index, u8 * reply); + int vnet_dns_delete_entry_by_index_nolock (dns_main_t * dm, u32 index); format_function_t format_dns_reply; |