Skip to content

Commit 8a98f11

Browse files
kpflemingyuwata
authored andcommitted
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.
1 parent 0ddad04 commit 8a98f11

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/network/networkd-address.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static int address_compare_func(const Address *a1, const Address *a2) {
187187
}
188188
}
189189

190-
DEFINE_PRIVATE_HASH_OPS(address_hash_ops, Address, address_hash_func, address_compare_func);
190+
DEFINE_HASH_OPS(address_hash_ops, Address, address_hash_func, address_compare_func);
191191

192192
bool address_equal(Address *a1, Address *a2) {
193193
if (a1 == a2)

src/network/networkd-address.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ int configure_ipv4_duplicate_address_detection(Link *link, Address *address);
6767

6868
DEFINE_NETWORK_SECTION_FUNCTIONS(Address, address_free);
6969

70+
extern const struct hash_ops address_hash_ops;
71+
7072
CONFIG_PARSER_PROTOTYPE(config_parse_address);
7173
CONFIG_PARSER_PROTOTYPE(config_parse_broadcast);
7274
CONFIG_PARSER_PROTOTYPE(config_parse_label);

0 commit comments

Comments
 (0)