diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-10-04 11:57:29 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-10-05 22:15:34 +0200 |
commit | 7f00146d0098e585727a219d4835800bc862b31d (patch) | |
tree | ecdf43ec07706105c720021de7be264b62bfeda8 /lib/doh.h | |
parent | ec49132faf0c8c42e08f4c77bb14988fd57075cb (diff) | |
download | curl-7f00146d0098e585727a219d4835800bc862b31d.tar.gz |
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.h | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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; }; |