interface-ip: fix misuse of IN6_IS_ADDR_LINKLOCAL on a netifd specific union
authorFelix Fietkau <nbd@openwrt.org>
Tue, 29 Apr 2014 13:24:48 +0000 (15:24 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 29 Apr 2014 13:24:48 +0000 (15:24 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface-ip.c

index 208ec3f0e723dd65ae0dafd8d738538228c03e2b..018b657888b5ad3feec7e54e8e308ea764b4aca2 100644 (file)
@@ -1043,7 +1043,7 @@ write_resolv_conf_entries(FILE *f, struct interface_ip_settings *ip, const char
                if (!str)
                        continue;
 
-               if (s->af == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&s->addr))
+               if (s->af == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&s->addr.in6))
                        fprintf(f, "nameserver %s%%%s\n", str, dev);
                else
                        fprintf(f, "nameserver %s\n", str);