projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
write_graphite plugin: Coding style fixes.
[collectd.git]
/
src
/
iptables.c
diff --git
a/src/iptables.c
b/src/iptables.c
index
69cd39c
..
806b7a4
100644
(file)
--- a/
src/iptables.c
+++ b/
src/iptables.c
@@
-1,8
+1,8
@@
/**
* collectd - src/iptables.c
/**
* collectd - src/iptables.c
- * Copyright (C) 2007 Sjoerd van der Berg
- * Copyright (C) 2007 Florian octo Forster
- * Copyright (C) 2009 Marco Chiappero
+ * Copyright (C) 2007
Sjoerd van der Berg
+ * Copyright (C) 2007
-2010
Florian octo Forster
+ * Copyright (C) 2009
Marco Chiappero
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@
-20,7
+20,7
@@
*
* Authors:
* Sjoerd van der Berg <harekiet at users.sourceforge.net>
*
* Authors:
* Sjoerd van der Berg <harekiet at users.sourceforge.net>
- * Florian Forster <octo at
verplant
.org>
+ * Florian Forster <octo at
collectd
.org>
* Marco Chiappero <marco at absence.it>
**/
* Marco Chiappero <marco at absence.it>
**/
@@
-29,15
+29,8
@@
#include "plugin.h"
#include "configfile.h"
#include "plugin.h"
#include "configfile.h"
-#include <sys/socket.h>
-
-#if OWN_LIBIPTC
-# include "owniptc/libiptc.h"
-# include "owniptc/libip6tc.h"
-#else
-# include <libiptc/libiptc.h>
-# include <libiptc/libip6tc.h>
-#endif
+#include <libiptc/libiptc.h>
+#include <libiptc/libip6tc.h>
/*
* iptc_handle_t was available before libiptc was officially available as a
/*
* iptc_handle_t was available before libiptc was officially available as a
@@
-218,6
+211,7
@@
static int iptables_config (const char *key, const char *value)
char errbuf[1024];
ERROR ("realloc failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
char errbuf[1024];
ERROR ("realloc failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
+ sfree (temp.rule.comment);
return (1);
}
return (1);
}
@@
-228,6
+222,7
@@
static int iptables_config (const char *key, const char *value)
char errbuf[1024];
ERROR ("malloc failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
char errbuf[1024];
ERROR ("malloc failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
+ sfree (temp.rule.comment);
return (1);
}
memcpy (final, &temp, sizeof (temp));
return (1);
}
memcpy (final, &temp, sizeof (temp));
@@
-293,11
+288,11
@@
static int submit6_match (const struct ip6t_entry_match *match,
}
sstrncpy (vl.type, "ipt_bytes", sizeof (vl.type));
}
sstrncpy (vl.type, "ipt_bytes", sizeof (vl.type));
- values[0].
counter = (counter
_t) entry->counters.bcnt;
+ values[0].
derive = (derive
_t) entry->counters.bcnt;
plugin_dispatch_values (&vl);
sstrncpy (vl.type, "ipt_packets", sizeof (vl.type));
plugin_dispatch_values (&vl);
sstrncpy (vl.type, "ipt_packets", sizeof (vl.type));
- values[0].
counter = (counter
_t) entry->counters.pcnt;
+ values[0].
derive = (derive
_t) entry->counters.pcnt;
plugin_dispatch_values (&vl);
return (0);
plugin_dispatch_values (&vl);
return (0);
@@
-354,11
+349,11
@@
static int submit_match (const struct ipt_entry_match *match,
}
sstrncpy (vl.type, "ipt_bytes", sizeof (vl.type));
}
sstrncpy (vl.type, "ipt_bytes", sizeof (vl.type));
- values[0].
counter = (counter
_t) entry->counters.bcnt;
+ values[0].
derive = (derive
_t) entry->counters.bcnt;
plugin_dispatch_values (&vl);
sstrncpy (vl.type, "ipt_packets", sizeof (vl.type));
plugin_dispatch_values (&vl);
sstrncpy (vl.type, "ipt_packets", sizeof (vl.type));
- values[0].
counter = (counter
_t) entry->counters.pcnt;
+ values[0].
derive = (derive
_t) entry->counters.pcnt;
plugin_dispatch_values (&vl);
return (0);
plugin_dispatch_values (&vl);
return (0);