summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-transaction.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-10 20:44:46 -0400
committerDaniel Mack <daniel@zonque.org>2015-12-08 16:41:45 +0100
commit4e5bf5e15899de3f9d11c2ddfe9721d9f8b07a37 (patch)
tree910ca3de1b0d59411ce0e5bdbce665dbff6a6510 /src/resolve/resolved-dns-transaction.c
parentbc7702b098b63031767174206f5df14a8ccb45cf (diff)
resolved: add packet header details for mDNS
Validate mDNS queries and responses by looking at some header fields, add mDNS flags.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r--src/resolve/resolved-dns-transaction.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index 1103a34c6f..f77931ed53 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/resolve/resolved-dns-transaction.c
@@ -384,6 +384,18 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) {
break;
+ case DNS_PROTOCOL_MDNS:
+ assert(t->scope->link);
+
+ /* For mDNS we will not accept any packets from other interfaces */
+ if (p->ifindex != t->scope->link->ifindex)
+ return;
+
+ if (p->family != t->scope->family)
+ return;
+
+ break;
+
case DNS_PROTOCOL_DNS:
break;