summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a133005)
raw | patch | inline | side by side (parent: a133005)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Dec 2007 15:41:53 +0000 (16:41 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Dec 2007 15:41:53 +0000 (16:41 +0100) |
src/iptables.c | patch | blob | history |
diff --git a/src/iptables.c b/src/iptables.c
index 5fa1f4086a8aa23dd5bfff14e289f0e80845d65c..0e7fa70f86740ec864f187e8e2b90d7c28644528 100644 (file)
--- a/src/iptables.c
+++ b/src/iptables.c
static int iptables_read (void)
{
int i;
- static complain_t complaint;
+ int num_failures = 0;
/* Init the iptc handle structure and query the correct table */
for (i = 0; i < chain_num; i++)
chain = chain_list[i];
if (!chain)
{
- DEBUG ("chain == NULL");
+ DEBUG ("iptables plugin: chain == NULL");
continue;
}
- handle = iptc_init( chain->table );
+ handle = iptc_init (chain->table);
if (!handle)
{
- DEBUG ("iptc_init (%s) failed: %s", chain->table, iptc_strerror (errno));
- plugin_complain (LOG_ERR, &complaint, "iptc_init (%s) failed: %s",
+ ERROR ("iptables plugin: iptc_init (%s) failed: %s",
chain->table, iptc_strerror (errno));
+ num_failures++;
continue;
}
- plugin_relief (LOG_INFO, &complaint, "iptc_init (%s) succeeded",
- chain->table);
submit_chain (&handle, chain);
iptc_free (&handle);
- }
+ } /* for (i = 0 .. chain_num) */
- return (0);
+ return ((num_failures < chain_num) ? 0 : -1);
} /* int iptables_read */
static int iptables_shutdown (void)