mirror of
https://github.com/systemd/systemd
synced 2024-10-04 23:31:09 +00:00
network: fix return value of routing_policy_rule_get()
To distinguish source of rule.
This commit is contained in:
parent
a6276f0f3f
commit
e6b65ab760
|
@ -785,7 +785,7 @@ static int link_set_routing_policy_rule(Link *link) {
|
|||
LIST_FOREACH(rules, rule, link->network->rules) {
|
||||
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, &rrule);
|
||||
if (r == 1) {
|
||||
if (r == 0) {
|
||||
(void) routing_policy_rule_make_local(link->manager, rrule);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ int routing_policy_rule_get(Manager *m,
|
|||
if (existing) {
|
||||
if (ret)
|
||||
*ret = existing;
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -ENOENT;
|
||||
|
|
Loading…
Reference in a new issue