summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-manager.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-11 13:17:51 -0400
committerDaniel Mack <daniel@zonque.org>2015-12-08 16:41:45 +0100
commitb4f1862df2e45aba90386887d685b8bf3c840e10 (patch)
tree08fa71f0eda4a334661e3d9a6e20bd043414c285 /src/resolve/resolved-manager.c
parent0db4c90afd7d9c7c8884bf8b3ec459edc74a03da (diff)
resolved: create dns scopes for mDNS
Follow what LLMNR does, and create per-link DnsScope objects.
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r--src/resolve/resolved-manager.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index fc2fb4d47c..a2677f442a 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -1031,11 +1031,25 @@ DnsScope* manager_find_scope(Manager *m, DnsPacket *p) {
if (!l)
return NULL;
- if (p->protocol == DNS_PROTOCOL_LLMNR) {
+ switch (p->protocol) {
+ case DNS_PROTOCOL_LLMNR:
if (p->family == AF_INET)
return l->llmnr_ipv4_scope;
else if (p->family == AF_INET6)
return l->llmnr_ipv6_scope;
+
+ break;
+
+ case DNS_PROTOCOL_MDNS:
+ if (p->family == AF_INET)
+ return l->mdns_ipv4_scope;
+ else if (p->family == AF_INET6)
+ return l->mdns_ipv6_scope;
+
+ break;
+
+ default:
+ break;
}
return NULL;