From: Kevin P. Fleming Date: Sun, 9 Feb 2020 12:18:35 +0000 (-0500) Subject: network: Make address_hash_ops available outside of networkd-address.c X-Git-Tag: v245-rc2~62^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a98f11ed0cde548da21dd820fc3f74dc6119f4d;p=thirdparty%2Fsystemd.git network: Make address_hash_ops available outside of networkd-address.c In order to allow other parts of systemd-networkd to use sets/hashmaps of Address objects, the address_hash_ops structure needs to be made available to them. --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 88bafb4d20c..59775869b60 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -187,7 +187,7 @@ static int address_compare_func(const Address *a1, const Address *a2) { } } -DEFINE_PRIVATE_HASH_OPS(address_hash_ops, Address, address_hash_func, address_compare_func); +DEFINE_HASH_OPS(address_hash_ops, Address, address_hash_func, address_compare_func); bool address_equal(Address *a1, Address *a2) { if (a1 == a2) diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index 76a30a54bcd..6995c5c06e0 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -67,6 +67,8 @@ int configure_ipv4_duplicate_address_detection(Link *link, Address *address); DEFINE_NETWORK_SECTION_FUNCTIONS(Address, address_free); +extern const struct hash_ops address_hash_ops; + CONFIG_PARSER_PROTOTYPE(config_parse_address); CONFIG_PARSER_PROTOTYPE(config_parse_broadcast); CONFIG_PARSER_PROTOTYPE(config_parse_label);