From: Daniel Wagner <[email protected]>

---
 src/iptables.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/iptables.c b/src/iptables.c
index 158dcf3..734ebc1 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -1061,8 +1061,13 @@ static int iptables_change_policy(struct 
connman_iptables *table,
        int verdict;
 
        verdict = target_to_verdict(policy);
-       if (verdict == 0)
+       switch (verdict) {
+       case -NF_ACCEPT - 1:
+       case -NF_DROP - 1:
+               break;
+       default:
                return -EINVAL;
+       }
 
        chain_head = find_chain_head(table, chain_name);
        if (chain_head == NULL)
-- 
1.8.1.3.566.gaa39828

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to