]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: Make address_hash_ops available outside of networkd-address.c
authorKevin P. Fleming <kevin@km6g.us>
Sun, 9 Feb 2020 12:18:35 +0000 (07:18 -0500)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 10 Feb 2020 06:37:37 +0000 (15:37 +0900)
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.

src/network/networkd-address.c
src/network/networkd-address.h

index 88bafb4d20c00bf536bd2c0fe40b8d33258c6c41..59775869b604a759e1e2bd7d6cb7be1bcd2b511e 100644 (file)
@@ -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)
index 76a30a54bcde39f467e264dc0c6b795e03bea764..6995c5c06e01e2a4f86cefa025fe5c93b26df4c8 100644 (file)
@@ -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);