network: do not configure routing policy rule if it is already configured

This commit is contained in:
Yu Watanabe 2019-06-18 13:09:06 +09:00
parent 34715d8b03
commit ff14e2ebcb
1 changed files with 3 additions and 2 deletions

View File

@ -842,8 +842,9 @@ static int link_request_set_routing_policy_rule(Link *link) {
r = routing_policy_rule_get(link->manager, rule->family, &rule->from, rule->from_prefixlen, &rule->to,
rule->to_prefixlen, rule->tos, rule->fwmark, rule->table, rule->iif, rule->oif,
rule->protocol, &rule->sport, &rule->dport, &rrule);
if (r == 0) {
(void) routing_policy_rule_make_local(link->manager, rrule);
if (r >= 0) {
if (r == 0)
(void) routing_policy_rule_make_local(link->manager, rrule);
continue;
}