mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-14 20:18:39 +00:00
device: in NMDeviceVxlan let address_matches ensure the unused address is NULL
We should only either set addr4 or addr6, not both. Let address_matches() check that the respective other address is null/unspecified.
This commit is contained in:
parent
71f681814b
commit
503fa9df7b
|
@ -229,7 +229,10 @@ address_matches(const char *candidate, in_addr_t addr4, struct in6_addr *addr6)
|
|||
NM_IS_IPv4(addr_family) ? (gpointer) &addr4 : addr6))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
if (NM_IS_IPv4(addr_family))
|
||||
return IN6_IS_ADDR_UNSPECIFIED(addr6);
|
||||
else
|
||||
return addr4 == 0u;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue