Compare commits
8 Commits
09d0b46ab6
...
c631c3d6a3
Author | SHA1 | Date |
---|---|---|
Yu Watanabe | c631c3d6a3 | |
Yu Watanabe | 69d7eba188 | |
Yu Watanabe | c1ed516cde | |
Yu Watanabe | 471e126b25 | |
Yu Watanabe | 095b3a7d90 | |
Yu Watanabe | e7825b2359 | |
Yu Watanabe | 9be6ae775f | |
Yu Watanabe | acb71754e1 |
|
@ -99,6 +99,13 @@ static sd_radv *radv_free(sd_radv *ra) {
|
||||||
sd_radv_prefix_unref(p);
|
sd_radv_prefix_unref(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (ra->route_prefixes) {
|
||||||
|
sd_radv_route_prefix *p = ra->route_prefixes;
|
||||||
|
|
||||||
|
LIST_REMOVE(prefix, ra->route_prefixes, p);
|
||||||
|
sd_radv_route_prefix_unref(p);
|
||||||
|
}
|
||||||
|
|
||||||
free(ra->rdnss);
|
free(ra->rdnss);
|
||||||
free(ra->dnssl);
|
free(ra->dnssl);
|
||||||
|
|
||||||
|
|
|
@ -306,7 +306,7 @@ int network_verify(Network *network) {
|
||||||
|
|
||||||
LIST_FOREACH_SAFE(prefixes, prefix, prefix_next, network->static_route_prefixes)
|
LIST_FOREACH_SAFE(prefixes, prefix, prefix_next, network->static_route_prefixes)
|
||||||
if (section_is_invalid(prefix->section))
|
if (section_is_invalid(prefix->section))
|
||||||
prefix_free(prefix);
|
route_prefix_free(prefix);
|
||||||
|
|
||||||
LIST_FOREACH_SAFE(rules, rule, rule_next, network->rules)
|
LIST_FOREACH_SAFE(rules, rule, rule_next, network->rules)
|
||||||
if (routing_policy_rule_section_verify(rule) < 0)
|
if (routing_policy_rule_section_verify(rule) < 0)
|
||||||
|
@ -654,6 +654,9 @@ static Network *network_free(Network *network) {
|
||||||
while ((prefix = network->static_prefixes))
|
while ((prefix = network->static_prefixes))
|
||||||
prefix_free(prefix);
|
prefix_free(prefix);
|
||||||
|
|
||||||
|
while ((prefix = network->static_route_prefixes))
|
||||||
|
route_prefix_free(prefix);
|
||||||
|
|
||||||
while ((rule = network->rules))
|
while ((rule = network->rules))
|
||||||
routing_policy_rule_free(rule);
|
routing_policy_rule_free(rule);
|
||||||
|
|
||||||
|
@ -664,6 +667,7 @@ static Network *network_free(Network *network) {
|
||||||
hashmap_free(network->neighbors_by_section);
|
hashmap_free(network->neighbors_by_section);
|
||||||
hashmap_free(network->address_labels_by_section);
|
hashmap_free(network->address_labels_by_section);
|
||||||
hashmap_free(network->prefixes_by_section);
|
hashmap_free(network->prefixes_by_section);
|
||||||
|
hashmap_free(network->route_prefixes_by_section);
|
||||||
hashmap_free(network->rules_by_section);
|
hashmap_free(network->rules_by_section);
|
||||||
ordered_hashmap_free_with_destructor(network->qdiscs_by_section, qdisc_free);
|
ordered_hashmap_free_with_destructor(network->qdiscs_by_section, qdisc_free);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ void prefix_free(Prefix *prefix) {
|
||||||
}
|
}
|
||||||
|
|
||||||
network_config_section_free(prefix->section);
|
network_config_section_free(prefix->section);
|
||||||
prefix->radv_prefix = sd_radv_prefix_unref(prefix->radv_prefix);
|
sd_radv_prefix_unref(prefix->radv_prefix);
|
||||||
|
|
||||||
free(prefix);
|
free(prefix);
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,7 @@ void route_prefix_free(Prefix *prefix) {
|
||||||
}
|
}
|
||||||
|
|
||||||
network_config_section_free(prefix->section);
|
network_config_section_free(prefix->section);
|
||||||
|
sd_radv_route_prefix_unref(prefix->radv_route_prefix);
|
||||||
|
|
||||||
free(prefix);
|
free(prefix);
|
||||||
}
|
}
|
||||||
|
@ -330,7 +331,7 @@ int config_parse_route_prefix(const char *unit,
|
||||||
void *userdata) {
|
void *userdata) {
|
||||||
|
|
||||||
Network *network = userdata;
|
Network *network = userdata;
|
||||||
_cleanup_(prefix_free_or_set_invalidp) Prefix *p = NULL;
|
_cleanup_(route_prefix_free_or_set_invalidp) Prefix *p = NULL;
|
||||||
uint8_t prefixlen = 64;
|
uint8_t prefixlen = 64;
|
||||||
union in_addr_union in6addr;
|
union in_addr_union in6addr;
|
||||||
int r;
|
int r;
|
||||||
|
@ -372,7 +373,7 @@ int config_parse_route_prefix_lifetime(const char *unit,
|
||||||
void *data,
|
void *data,
|
||||||
void *userdata) {
|
void *userdata) {
|
||||||
Network *network = userdata;
|
Network *network = userdata;
|
||||||
_cleanup_(prefix_free_or_set_invalidp) Prefix *p = NULL;
|
_cleanup_(route_prefix_free_or_set_invalidp) Prefix *p = NULL;
|
||||||
usec_t usec;
|
usec_t usec;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
@ -388,7 +389,8 @@ int config_parse_route_prefix_lifetime(const char *unit,
|
||||||
|
|
||||||
r = parse_sec(rvalue, &usec);
|
r = parse_sec(rvalue, &usec);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_syntax(unit, LOG_ERR, filename, line, r, "Roure lifetime is invalid, ignoring assignment: %s", rvalue);
|
log_syntax(unit, LOG_ERR, filename, line, r,
|
||||||
|
"Route lifetime is invalid, ignoring assignment: %s", rvalue);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue