kernel-netlink: Ignore preference for temporary addresses for IPv6 VIPs

They are not marked as temporary addresses so make sure we always return
them whether temporary addresses are preferred as source addresses or not
as we need to enumerate them when searching for addresses in traffic selectors
to install routes.

Fixes: 9f12b8a61c ("kernel-netlink: Enumerate temporary IPv6 addresses according to config")
This commit is contained in:
Tobias Brunner 2020-07-07 10:01:46 +02:00
parent 10a913685f
commit fd94c1301e
1 changed files with 2 additions and 2 deletions

View File

@ -1547,8 +1547,8 @@ CALLBACK(filter_addresses, bool,
{ /* skip deprecated addresses or those with an unusable scope */
continue;
}
if (addr->ip->get_family(addr->ip) == AF_INET6)
{ /* handle temporary IPv6 addresses according to config */
if (!addr->refcount && addr->ip->get_family(addr->ip) == AF_INET6)
{ /* handle non-VIP temporary IPv6 addresses according to config */
bool temporary = (addr->flags & IFA_F_TEMPORARY) == IFA_F_TEMPORARY;
if (data->this->prefer_temporary_addrs != temporary)
{