diff options
author | Dave Reisner <dreisner@archlinux.org> | 2018-07-07 05:39:01 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-07-07 13:48:59 +0200 |
commit | 25ea58d37385af27301b7ad25e985eb15f421614 (patch) | |
tree | bc4adfff764570715b6578c4b9997f3061b1cc37 /src/libsystemd-network/network-internal.c | |
parent | ff9d955b1546bdebf9c99fb8ad065ef7c7dc72a2 (diff) | |
download | systemd-25ea58d37385af27301b7ad25e985eb15f421614.tar.gz systemd-25ea58d37385af27301b7ad25e985eb15f421614.tar.bz2 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/libsystemd-network/network-internal.c')
-rw-r--r-- | src/libsystemd-network/network-internal.c | 2 |
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)) |