chiark / gitweb /
resolved: fall back to hardcoded ifindex when checking if a link is the loopback
[elogind.git] / src / resolve / resolved-dns-scope.c
index 396ae19e488e97eb46a5c49beab16a744d3fe806..039a754ff06fe4a6a8eda461b7389c167b92b13b 100644 (file)
@@ -365,6 +365,13 @@ int dns_scope_good_key(DnsScope *s, DnsResourceKey *key) {
 int dns_scope_llmnr_membership(DnsScope *s, bool b) {
         int fd;
 
+        assert(s);
+
+        if (s->protocol != DNS_PROTOCOL_LLMNR)
+                return 0;
+
+        assert(s->link);
+
         if (s->family == AF_INET) {
                 struct ip_mreqn mreqn = {
                         .imr_multiaddr = LLMNR_MULTICAST_IPV4_ADDRESS,