resolved: clarify that LLMNR scopes must have a link assigned
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Aug 2014 17:56:22 +0000 (19:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 14 Aug 2014 17:56:22 +0000 (19:56 +0200)
This is supposed to remove some compiler warnings:

http://lists.freedesktop.org/archives/systemd-devel/2014-July/021393.html

src/resolve/resolved-dns-scope.c

index 396ae19..85709a4 100644 (file)
@@ -365,6 +365,10 @@ int dns_scope_good_key(DnsScope *s, DnsResourceKey *key) {
 int dns_scope_llmnr_membership(DnsScope *s, bool b) {
         int fd;
 
+        assert(s);
+        assert(s->protocol == DNS_PROTOCOL_LLMNR);
+        assert(s->link);
+
         if (s->family == AF_INET) {
                 struct ip_mreqn mreqn = {
                         .imr_multiaddr = LLMNR_MULTICAST_IPV4_ADDRESS,