]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
CT: fix --ctevents parsing
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 9 May 2010 19:47:33 +0000 (21:47 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 9 May 2010 19:47:33 +0000 (21:47 +0200)
This patch fixes the following problem:

# iptables -t raw -I PREROUTING -t raw -j CT --ctevents assured
iptables v1.4.7: Unknown event type "assured"
Try `iptables -h' or 'iptables --help' for more information.

However, `assured' is one of the supported arguments for --ctevents.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_CT.c

index 9f9d95241ae21209a0b658029b2d9148880c9c01..6be6ea0566b595d358f02a0531734264e52c4c48 100644 (file)
@@ -67,9 +67,9 @@ static uint32_t ct_parse_events(const struct event_tbl *tbl, unsigned int size,
        strcpy(str, events);
        while ((t = strsep(&e, ","))) {
                for (i = 0; i < size; i++) {
-                       if (strcmp(t, tbl->name))
+                       if (strcmp(t, tbl[i].name))
                                continue;
-                       mask |= 1 << tbl->event;
+                       mask |= 1 << tbl[i].event;
                        break;
                }