From: Saverio Proto Date: Sun, 17 Aug 2014 13:15:57 +0000 (+0200) Subject: Dont learn localhost and IPv6 link local with AVAHI X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=85eb9499d264c8c27f4f44c0233558ec18d8f35f;p=meshlink Dont learn localhost and IPv6 link local with AVAHI --- diff --git a/src/meshlink.c b/src/meshlink.c index 95665115..61cd6240 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1836,7 +1836,10 @@ void meshlink_hint_address(meshlink_handle_t *mesh, meshlink_node_t *node, const if(host && port) { xasprintf(&str, "%s %s", host, port); - append_config_file(mesh, node->name, "Address", str); + if ( (strncmp ("fe80",host,4) != 0) && ( strncmp("127.",host,4) != 0 ) && ( strcmp("localhost",host) !=0 ) ) + append_config_file(mesh, node->name, "Address", str); + else + logger(mesh, MESHLINK_DEBUG, "Not adding Link Local IPv6 Address to config\n"); } free(str);