Merge pull request #16914 from miri64/dns_msg/fix/id-byteorder

dns_msg: Use correct byteorder for ID
This commit is contained in:
benpicco 2021-09-29 17:13:09 +02:00 committed by GitHub
commit df52b076d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ size_t dns_msg_compose_query(void *dns_buf, const char *domain_name,
dns_hdr_t *hdr = (dns_hdr_t*) buf;
memset(hdr, 0, sizeof(*hdr));
hdr->id = id;
hdr->id = htons(id);
hdr->flags = htons(0x0120);
hdr->qdcount = htons(1 + (family == AF_UNSPEC));