aboutsummaryrefslogtreecommitdiff
path: root/lib/doh.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-04 11:57:29 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-10-05 22:15:34 +0200
commit7f00146d0098e585727a219d4835800bc862b31d (patch)
treeecdf43ec07706105c720021de7be264b62bfeda8 /lib/doh.h
parentec49132faf0c8c42e08f4c77bb14988fd57075cb (diff)
doh: keep the IPv4 address in (original) network byte order
Ideally this will fix the reversed order shown in SPARC tests: resp 8: Expected 127.0.0.1 got 1.0.0.127 Closes #3091
Diffstat (limited to 'lib/doh.h')
-rw-r--r--lib/doh.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/doh.h b/lib/doh.h
index 96c1fa7c1..5f879e50e 100644
--- a/lib/doh.h
+++ b/lib/doh.h
@@ -67,10 +67,6 @@ typedef enum {
#define DOH_MAX_ADDR 24
#define DOH_MAX_CNAME 4
-struct addr6 {
- unsigned char byte[16];
-};
-
struct cnamestore {
size_t len; /* length of cname */
char *alloc; /* allocated pointer */
@@ -80,8 +76,8 @@ struct cnamestore {
struct dohaddr {
int type;
union {
- unsigned int v4;
- struct addr6 v6;
+ unsigned char v4[4]; /* network byte order */
+ unsigned char v6[16];
} ip;
};