]> git.meshlink.io Git - meshlink/commitdiff
ignore unknown address types (just in case)
authorNiklas Hofmann <niklas.hofmann@everbase.net>
Thu, 31 Jul 2014 01:21:53 +0000 (03:21 +0200)
committerNiklas Hofmann <niklas.hofmann@everbase.net>
Thu, 31 Jul 2014 01:21:53 +0000 (03:21 +0200)
src/discovery.c

index a7b36c482e107ab326199f9902b4534b752398ff..8f0f925e9d41581fb61d015d2f8865f8d9db54d6 100644 (file)
@@ -107,7 +107,10 @@ static void discovery_resolve_callback(
                 }
 
                 // @TODO: aquire mutex?
-                meshlink_hint_address(mesh, node->name, &naddr);
+                if(naddr.ss_family == AF_INET || naddr.ss_family == AF_INET6)
+                {
+                    meshlink_hint_address(mesh, node->name, (struct sockaddr*)&naddr);
+                }
             }
             else
             {