1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

network: IFA_F_NODAD flag is only for IPv6 addresses

This commit is contained in:
Yu Watanabe 2021-06-16 08:33:04 +09:00
parent ad64e3e8d6
commit bd5146c67e

View File

@ -2111,7 +2111,8 @@ static int address_section_verify(Address *address) {
address->scope = RT_SCOPE_HOST;
}
if (!FLAGS_SET(address->duplicate_address_detection, ADDRESS_FAMILY_IPV6))
if (address->family == AF_INET6 &&
!FLAGS_SET(address->duplicate_address_detection, ADDRESS_FAMILY_IPV6))
address->flags |= IFA_F_NODAD;
return 0;