1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

network/link: Fix logic error in matching devices by MAC

Prior to this commit, a .link file with a [Match] section containing
MACAddress= would match any device without a MAC. This restores the
matching logic prior to e90d037.
This commit is contained in:
Dave Reisner 2018-07-07 05:39:01 -04:00 committed by Zbigniew Jędrzejewski-Szmek
parent ff9d955b15
commit 25ea58d373

View File

@ -124,7 +124,7 @@ bool net_match_config(Set *match_mac,
if (match_arch && condition_test(match_arch) <= 0)
return false;
if (match_mac && dev_mac && !set_contains(match_mac, dev_mac))
if (match_mac && (!dev_mac || !set_contains(match_mac, dev_mac)))
return false;
if (!net_condition_test_strv(match_paths, dev_path))