/* If the interface already has the address configured
* then we can't ARP for duplicate detection. */
addr.s_addr = state->offer->yiaddr;
- if (!has_address(iface->name, &addr, NULL)) {
+ if (has_address(iface->name, &addr, NULL) != 1) {
state->claims = 0;
state->probes = 0;
state->conflicts = 0;
if (ifa->ifa_addr->sa_family != AF_INET ||
strcmp(ifa->ifa_name, ifname) != 0)
continue;
- a = (const struct sockaddr_in *)(void *)&ifa->ifa_addr;
- n = (const struct sockaddr_in *)(void *)&ifa->ifa_netmask;
+ a = (const struct sockaddr_in *)(void *)ifa->ifa_addr;
+ n = (const struct sockaddr_in *)(void *)ifa->ifa_netmask;
if (ifa->ifa_flags & IFF_POINTOPOINT)
d = (const struct sockaddr_in *)(void *)
&ifa->ifa_dstaddr;