network: add one more section validty check

Follow-up for 203d4df573.
This commit is contained in:
Yu Watanabe
2019-09-21 20:17:15 +09:00
parent 9b6dddd170
commit 714a199e48
+4
View File
@@ -300,6 +300,10 @@ int network_verify(Network *network) {
if (section_is_invalid(prefix->section))
prefix_free(prefix);
LIST_FOREACH_SAFE(prefixes, prefix, prefix_next, network->static_route_prefixes)
if (section_is_invalid(prefix->section))
prefix_free(prefix);
LIST_FOREACH_SAFE(rules, rule, rule_next, network->rules)
if (routing_policy_rule_section_verify(rule) < 0)
routing_policy_rule_free(rule);