aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-12-04 22:21:47 +0000
committerMichael Brown <mcb30@ipxe.org>2013-12-05 00:41:49 +0000
commit6248894f52b5794970292ea40f68fe0c892eafec (patch)
tree25cfd1614410615498bb091158da5c6b7f9bf42c /src/include
parent60c4e62e5dc56a451958456c7c013b161e53c9b9 (diff)
downloadipxe-6248894f52b5794970292ea40f68fe0c892eafec.tar.gz
[dns] Add support for resolving IPv6 addresses via AAAA records
Our policy is to prefer IPv6 addreses to IPv4 addresses, but to request IPv6 addresses only if we have an IPv6 address for the name server itself. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/dhcpv6.h4
-rw-r--r--src/include/ipxe/dns.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/include/ipxe/dhcpv6.h b/src/include/ipxe/dhcpv6.h
index 7a1a2b07f..a0a8d05b0 100644
--- a/src/include/ipxe/dhcpv6.h
+++ b/src/include/ipxe/dhcpv6.h
@@ -147,10 +147,10 @@ struct dhcpv6_user_class_option {
#define DHCPV6_USER_CLASS 15
/** DHCPv6 DNS recursive name server option */
-#define DHCPV6_DNS_SERVER 23
+#define DHCPV6_DNS_SERVERS 23
/** DHCPv6 domain search list option */
-#define DHCPV6_DOMAIN_SEARCH 24
+#define DHCPV6_DOMAIN_LIST 24
/**
* Any DHCPv6 option
diff --git a/src/include/ipxe/dns.h b/src/include/ipxe/dns.h
index 1c427601a..164c16aec 100644
--- a/src/include/ipxe/dns.h
+++ b/src/include/ipxe/dns.h
@@ -19,6 +19,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define DNS_TYPE_A 1
#define DNS_TYPE_CNAME 5
+#define DNS_TYPE_AAAA 28
#define DNS_TYPE_ANY 255
#define DNS_CLASS_IN 1
@@ -78,6 +79,11 @@ struct dns_rr_info_a {
struct in_addr in_addr;
} __attribute__ (( packed ));
+struct dns_rr_info_aaaa {
+ struct dns_rr_info_common common;
+ struct in6_addr in6_addr;
+} __attribute__ (( packed ));
+
struct dns_rr_info_cname {
struct dns_rr_info_common common;
char cname[0];
@@ -86,6 +92,7 @@ struct dns_rr_info_cname {
union dns_rr_info {
struct dns_rr_info_common common;
struct dns_rr_info_a a;
+ struct dns_rr_info_aaaa aaaa;
struct dns_rr_info_cname cname;
};