aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-24 07:44:16 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-24 07:44:16 +0000
commit5433ddd32ba2c67e5b42067be4e04e35c3280873 (patch)
tree0cee35bc5f30079e3828bae3f40cc566a822d52b
parentd7aebe0b5a27e070cd7e68c9b330e835d93b0268 (diff)
downloadsitesummary-5433ddd32ba2c67e5b42067be4e04e35c3280873.tar.gz
sitesummary-5433ddd32ba2c67e5b42067be4e04e35c3280873.tar.bz2
sitesummary-5433ddd32ba2c67e5b42067be4e04e35c3280873.tar.xz
Ignore entries from hosts without /proc/ mounted.
-rw-r--r--debian/changelog7
-rw-r--r--sitesummary-collector.cgi6
2 files changed, 13 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index ce98680..1a345a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+sitesummary (0.0.58) UNRELEASED; urgency=low
+
+ * Ignore entries from host failing to report MAC address, and log this
+ to syslog, to avoid getting bogus entries.
+
+ -- Petter Reinholdtsen <pere@debian.org> Sun, 24 Jan 2010 08:43:39 +0100
+
sitesummary (0.0.57) unstable; urgency=low
* Allow numbers in Nagios host class names.
diff --git a/sitesummary-collector.cgi b/sitesummary-collector.cgi
index 7d10de0..06acf4c 100644
--- a/sitesummary-collector.cgi
+++ b/sitesummary-collector.cgi
@@ -126,6 +126,12 @@ sub process_entry {
close(PEERINFO) || die;
my $id = extract_unique_id($dirname);
+ if ("ether-unknown" eq $id) {
+ syslog('warning', "%s", "ignoring client without MAC address connected from \[$peeripaddr\]");
+ chdir "..";
+ `rm -r $dirname`;
+ return;
+ }
my $newdir = "$basedir/entries/$id";
my $status = "new";