summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2018-07-07 11:39:01 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-07-07 13:48:59 +0200
commit25ea58d37385af27301b7ad25e985eb15f421614 (patch)
treebc4adfff764570715b6578c4b9997f3061b1cc37 /src
parenthwdb: Add accelerometer orientation quirk for Asus TP200SA (diff)
downloadsystemd-25ea58d37385af27301b7ad25e985eb15f421614.tar.xz
systemd-25ea58d37385af27301b7ad25e985eb15f421614.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-network/network-internal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index 0849b44ee2..9d16d6c747 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -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))