diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-12-10 16:49:31 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-12-10 16:49:31 +0100 |
commit | 4d3f0f66e6f437a8edcee6a9df70bbdf205795b4 (patch) | |
tree | c5c34c36e949becf42d04f68b9163aaa59802bb4 /src/resolve/resolved-dns-scope.c | |
parent | 553947b77c3232d5795cbb2cd1129e74cb11c86d (diff) | |
parent | fe2dfc8b4947451f87fcae56f839ca84dde26453 (diff) |
Merge pull request #2135 from zonque/resolved-mdns-3
resolved: more mDNS specific bits (3)
Diffstat (limited to 'src/resolve/resolved-dns-scope.c')
-rw-r--r-- | src/resolve/resolved-dns-scope.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index ac44cf2343..61bca04b94 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -822,7 +822,11 @@ static int dns_scope_make_conflict_packet( 0 /* (ad) */, 0 /* (cd) */, 0)); - random_bytes(&DNS_PACKET_HEADER(p)->id, sizeof(uint16_t)); + + /* For mDNS, the transaction ID should always be 0 */ + if (s->protocol != DNS_PROTOCOL_MDNS) + random_bytes(&DNS_PACKET_HEADER(p)->id, sizeof(uint16_t)); + DNS_PACKET_HEADER(p)->qdcount = htobe16(1); DNS_PACKET_HEADER(p)->arcount = htobe16(1); |