Commit 2b89fd8c authored by Jussi Laakkonen's avatar Jussi Laakkonen

[connman] Ignore rule adding errors with managed firewall rules. JB#43998

Changed firewall rule enabling to report the last error and not to stop
when one error is encountered while enabling all rules.
parent 48c1e54a
......@@ -547,6 +547,7 @@ int __connman_firewall_enable_rule(struct firewall_context *ctx, int id)
{
struct fw_rule *rule;
GList *list;
int e;
int err = -ENOENT;
int count = 0;
......@@ -554,10 +555,13 @@ int __connman_firewall_enable_rule(struct firewall_context *ctx, int id)
rule = list->data;
if (rule->id == id || id == FW_ALL_RULES) {
err = firewall_enable_rule(rule);
e = firewall_enable_rule(rule);
if (err < 0)
break;
/* Do not stop if enabling all rules */
if (e == 0 && err == -ENOENT)
err = 0;
else if (e < 0)
err = e;
if (id != FW_ALL_RULES)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment