---
 tools/iptables-test.c |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/tools/iptables-test.c b/tools/iptables-test.c
index 4e663a5..354be86 100644
--- a/tools/iptables-test.c
+++ b/tools/iptables-test.c
@@ -1378,7 +1378,7 @@ done:
 int main(int argc, char *argv[])
 {
        struct connman_iptables *table;
-       struct xtables_rule_match *xt_rm;
+       struct xtables_rule_match *xt_rm, *tmp_xt_rm;
        struct xtables_match *xt_m;
        struct xtables_target *xt_t;
        struct ipt_ip ip;
@@ -1543,6 +1543,28 @@ int main(int argc, char *argv[])
                                        XT_OPTION_OFFSET_SCALE)) {
                                xtables_option_tpcall(c, argv,
                                                        invert, xt_t, NULL);
+
+                               break;
+                       }
+
+                       for (tmp_xt_rm = xt_rm; tmp_xt_rm != NULL;
+                                               tmp_xt_rm = tmp_xt_rm->next) {
+                               xt_m = tmp_xt_rm->match;
+
+                               if (tmp_xt_rm->completed ||
+                                               (xt_m->x6_parse == NULL &&
+                                                xt_m->parse == NULL))
+                                       continue;
+
+                               if (c < (int) xt_m->option_offset ||
+                                               c >= (int) xt_m->option_offset
+                                               + XT_OPTION_OFFSET_SCALE)
+                                       continue;
+
+                               xtables_option_mpcall(c, argv,
+                                                       invert, xt_m, NULL);
+
+                               break;
                        }
 
                        break;
-- 
1.7.7

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

Reply via email to