resolved: replace bitwise and with logical and
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 18 Jul 2016 20:42:09 +0000 (22:42 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 18 Jul 2016 20:42:13 +0000 (22:42 +0200)
src/resolve/resolved-dns-packet.c

index ea0be56..a8ad8fe 100644 (file)
@@ -720,7 +720,7 @@ int dns_packet_append_opt(DnsPacket *p, uint16_t max_udp_size, bool edns0_do, in
                 goto fail;
 
         /* RDLENGTH */
-        if (edns0_do & !DNS_PACKET_QR(p)) {
+        if (edns0_do && !DNS_PACKET_QR(p)) {
                 /* If DO is on and this is not a reply, also append RFC6975 Algorithm data */
 
                 static const uint8_t rfc6975[] = {