]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: fix dbus matchmac interface (#3485)
authorAndrew Jeddeloh <andrewjeddeloh@gmail.com>
Fri, 10 Jun 2016 10:35:43 +0000 (03:35 -0700)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Jun 2016 10:35:43 +0000 (12:35 +0200)
Fix issue where the *Network passed via userdata is being offset
by offsetof(Network, matchmac) leading to incorrect values being
exposed in dbus.

src/network/networkd-network-bus.c

index d6b7448a43c98c1ad06dd21f2590d66c2e438f75..6e21676d2311e5339cf7195cf9e9ab2c2a83ff0e 100644 (file)
@@ -60,7 +60,7 @@ const sd_bus_vtable network_vtable[] = {
 
         SD_BUS_PROPERTY("Description", "s", NULL, offsetof(Network, description), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("SourcePath", "s", NULL, offsetof(Network, filename), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("MatchMAC", "as", property_get_ether_addrs, offsetof(Network, match_mac), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("MatchMAC", "as", property_get_ether_addrs, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("MatchPath", "as", NULL, offsetof(Network, match_path), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("MatchDriver", "as", NULL, offsetof(Network, match_driver), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("MatchType", "as", NULL, offsetof(Network, match_type), SD_BUS_VTABLE_PROPERTY_CONST),