summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-dns-scope.c
diff options
context:
space:
mode:
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>2016-12-02 13:17:15 +0100
committerDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>2017-01-19 10:51:21 +0100
commitd37baf4016b92cf0aee7dcef77446f73a2ed47e9 (patch)
tree76b9a4537609cc20264b30cf3afc9eebf88775f9 /src/resolve/resolved-dns-scope.c
parentresolved: set description to correct event source (diff)
downloadsystemd-d37baf4016b92cf0aee7dcef77446f73a2ed47e9.tar.xz
systemd-d37baf4016b92cf0aee7dcef77446f73a2ed47e9.zip
resolved: set multicast membership for mDNS sockets
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Diffstat (limited to 'src/resolve/resolved-dns-scope.c')
-rw-r--r--src/resolve/resolved-dns-scope.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index 8dbc7f623b..92171107df 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -549,7 +549,11 @@ static int dns_scope_multicast_membership(DnsScope *s, bool b, struct in_addr in
.imr_ifindex = s->link->ifindex,
};
- fd = manager_llmnr_ipv4_udp_fd(s->manager);
+ if (s->protocol == DNS_PROTOCOL_LLMNR)
+ fd = manager_llmnr_ipv4_udp_fd(s->manager);
+ else
+ fd = manager_mdns_ipv4_fd(s->manager);
+
if (fd < 0)
return fd;
@@ -568,7 +572,11 @@ static int dns_scope_multicast_membership(DnsScope *s, bool b, struct in_addr in
.ipv6mr_interface = s->link->ifindex,
};
- fd = manager_llmnr_ipv6_udp_fd(s->manager);
+ if (s->protocol == DNS_PROTOCOL_LLMNR)
+ fd = manager_llmnr_ipv6_udp_fd(s->manager);
+ else
+ fd = manager_mdns_ipv6_fd(s->manager);
+
if (fd < 0)
return fd;