main: fix the check on inet_pton return value because it returns 1 on success.
[olsrd.git] / src / linux / net.c
index 7707303..650773f 100644 (file)
@@ -637,7 +637,7 @@ get_ipv6_address(char *ifname, struct sockaddr_in6 *saddr6, struct olsr_ip_prefi
         OLSR_PRINTF(5, "\tinet6 addr: %s\n", addr6);
         OLSR_PRINTF(5, "\tScope: %d\n", scope);
 
-        if (inet_pton(AF_INET6, addr6, &tmp_ip.v6)) {
+        if (inet_pton(AF_INET6, addr6, &tmp_ip.v6) != 1) {
           continue;
         }