summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-04-15 14:21:44 +0200
committerTom Gundersen <teg@jklm.no>2014-04-19 18:41:58 +0200
commit505f8da7325591defe5f751f328bd26915267602 (patch)
tree5f4ff2ad396ab7666ac45ed2e1a9f3ff1f13b62b /src/libsystemd-network
parentd1ca51b153d7854d49400289ddedc7d493458f71 (diff)
networkd: tie links to rtnl rather than udev
This essentially swaps the roles of rtnl and udev in networkd. After this change libudev is only used for waiting for udev to initialize devices and to get udev-specific information needed for some [Match] attributes. This in particular simplifies the code in containers where udev is not really useful, but also simplifies things and reduces round-trips in the non-container case.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/network-internal.c4
-rw-r--r--src/libsystemd-network/network-internal.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index 3686267b07..52e614c4ea 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -79,7 +79,7 @@ bool net_match_config(const struct ether_addr *match_mac,
Condition *match_virt,
Condition *match_kernel,
Condition *match_arch,
- const char *dev_mac,
+ const struct ether_addr *dev_mac,
const char *dev_path,
const char *dev_parent_driver,
const char *dev_driver,
@@ -98,7 +98,7 @@ bool net_match_config(const struct ether_addr *match_mac,
if (match_arch && !condition_test_architecture(match_arch))
return 0;
- if (match_mac && (!dev_mac || memcmp(match_mac, ether_aton(dev_mac), ETH_ALEN)))
+ if (match_mac && (!dev_mac || memcmp(match_mac, dev_mac, ETH_ALEN)))
return 0;
if (match_path && (!dev_path || fnmatch(match_path, dev_path, 0)))
diff --git a/src/libsystemd-network/network-internal.h b/src/libsystemd-network/network-internal.h
index 65cd0d72a0..836472a776 100644
--- a/src/libsystemd-network/network-internal.h
+++ b/src/libsystemd-network/network-internal.h
@@ -37,7 +37,7 @@ bool net_match_config(const struct ether_addr *match_mac,
Condition *match_virt,
Condition *match_kernel,
Condition *match_arch,
- const char *dev_mac,
+ const struct ether_addr *dev_mac,
const char *dev_path,
const char *dev_parent_driver,
const char *dev_driver,