chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-event: fix typo
[elogind.git]
/
src
/
libsystemd-network
/
network-internal.c
diff --git
a/src/libsystemd-network/network-internal.c
b/src/libsystemd-network/network-internal.c
index 5867aef662c90e5c579c544816465c7e1aea287a..d579755cc81b15d17d58f76ee71c526366d9a50b 100644
(file)
--- a/
src/libsystemd-network/network-internal.c
+++ b/
src/libsystemd-network/network-internal.c
@@
-25,7
+25,6
@@
#include "strv.h"
#include "siphash24.h"
#include "strv.h"
#include "siphash24.h"
-#include "libudev-private.h"
#include "dhcp-lease-internal.h"
#include "log.h"
#include "utf8.h"
#include "dhcp-lease-internal.h"
#include "log.h"
#include "utf8.h"
@@
-112,17
+111,21
@@
bool net_match_config(const struct ether_addr *match_mac,
if (match_mac && (!dev_mac || memcmp(match_mac, dev_mac, ETH_ALEN)))
return false;
if (match_mac && (!dev_mac || memcmp(match_mac, dev_mac, ETH_ALEN)))
return false;
- if (!strv_isempty(match_paths))
- return strv_fnmatch(dev_path, match_paths, 0);
+ if (!strv_isempty(match_paths) &&
+ (!dev_path || !strv_fnmatch(match_paths, dev_path, 0)))
+ return false;
- if (!strv_isempty(match_drivers))
- return strv_fnmatch(dev_driver, match_drivers, 0);
+ if (!strv_isempty(match_drivers) &&
+ (!dev_driver || !strv_fnmatch(match_drivers, dev_driver, 0)))
+ return false;
- if (!strv_isempty(match_types))
- return strv_fnmatch(dev_type, match_types, 0);
+ if (!strv_isempty(match_types) &&
+ (!dev_type || !strv_fnmatch_or_empty(match_types, dev_type, 0)))
+ return false;
- if (!strv_isempty(match_names))
- return strv_fnmatch(dev_name, match_names, 0);
+ if (!strv_isempty(match_names) &&
+ (!dev_name || !strv_fnmatch_or_empty(match_names, dev_name, 0)))
+ return false;
return true;
}
return true;
}