diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index edcd68d616..26b007b72f 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -754,7 +754,7 @@ static Network *network_free(Network *network) { hashmap_free_with_destructor(network->rules_by_section, routing_policy_rule_free); hashmap_free_with_destructor(network->dhcp_static_leases_by_section, dhcp_static_lease_free); ordered_hashmap_free_with_destructor(network->sr_iov_by_section, sr_iov_free); - ordered_hashmap_free_with_destructor(network->tc_by_section, traffic_control_free); + hashmap_free_with_destructor(network->tc_by_section, traffic_control_free); free(network->name); diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h index f7eb37aced..54a855aa4d 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -340,7 +340,7 @@ struct Network { Hashmap *route_prefixes_by_section; Hashmap *rules_by_section; Hashmap *dhcp_static_leases_by_section; - OrderedHashmap *tc_by_section; + Hashmap *tc_by_section; OrderedHashmap *sr_iov_by_section; /* All kinds of DNS configuration */ diff --git a/src/network/tc/qdisc.c b/src/network/tc/qdisc.c index 7df6449de6..665b2a270c 100644 --- a/src/network/tc/qdisc.c +++ b/src/network/tc/qdisc.c @@ -92,7 +92,7 @@ int qdisc_new_static(QDiscKind kind, Network *network, const char *filename, uns if (r < 0) return r; - existing = ordered_hashmap_get(network->tc_by_section, n); + existing = hashmap_get(network->tc_by_section, n); if (existing) { if (existing->kind != TC_KIND_QDISC) return -EINVAL; @@ -126,7 +126,7 @@ int qdisc_new_static(QDiscKind kind, Network *network, const char *filename, uns qdisc->section = TAKE_PTR(n); qdisc->source = NETWORK_CONFIG_SOURCE_STATIC; - r = ordered_hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, qdisc->section, TC(qdisc)); + r = hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, qdisc->section, TC(qdisc)); if (r < 0) return r; @@ -139,7 +139,7 @@ QDisc* qdisc_free(QDisc *qdisc) { return NULL; if (qdisc->network && qdisc->section) - ordered_hashmap_remove(qdisc->network->tc_by_section, qdisc->section); + hashmap_remove(qdisc->network->tc_by_section, qdisc->section); config_section_free(qdisc->section); diff --git a/src/network/tc/tc.c b/src/network/tc/tc.c index cca5a92e62..7be2de6354 100644 --- a/src/network/tc/tc.c +++ b/src/network/tc/tc.c @@ -136,7 +136,7 @@ int link_request_traffic_control(Link *link) { link->tc_configured = false; - ORDERED_HASHMAP_FOREACH(tc, link->network->tc_by_section) { + HASHMAP_FOREACH(tc, link->network->tc_by_section) { r = link_request_traffic_control_one(link, tc); if (r < 0) return r; @@ -213,7 +213,7 @@ void network_drop_invalid_traffic_control(Network *network) { assert(network); - ORDERED_HASHMAP_FOREACH(tc, network->tc_by_section) + HASHMAP_FOREACH(tc, network->tc_by_section) if (traffic_control_section_verify(tc, &has_root, &has_clsact) < 0) traffic_control_free(tc); } diff --git a/src/network/tc/tclass.c b/src/network/tc/tclass.c index 903ff28336..676733c33f 100644 --- a/src/network/tc/tclass.c +++ b/src/network/tc/tclass.c @@ -73,7 +73,7 @@ int tclass_new_static(TClassKind kind, Network *network, const char *filename, u if (r < 0) return r; - existing = ordered_hashmap_get(network->tc_by_section, n); + existing = hashmap_get(network->tc_by_section, n); if (existing) { TClass *t; @@ -97,7 +97,7 @@ int tclass_new_static(TClassKind kind, Network *network, const char *filename, u tclass->section = TAKE_PTR(n); tclass->source = NETWORK_CONFIG_SOURCE_STATIC; - r = ordered_hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, tclass->section, tclass); + r = hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, tclass->section, tclass); if (r < 0) return r; @@ -110,7 +110,7 @@ TClass* tclass_free(TClass *tclass) { return NULL; if (tclass->network && tclass->section) - ordered_hashmap_remove(tclass->network->tc_by_section, tclass->section); + hashmap_remove(tclass->network->tc_by_section, tclass->section); config_section_free(tclass->section);