Peter Ward [Wed, 15 Mar 2017 03:55:09 +0000 (14:55 +1100)]
Export host statistics in prometheus text format on /metrics.
Emil Mikulic [Thu, 1 Sep 2016 07:51:50 +0000 (17:51 +1000)]
Remove dead code after call to dns_main().
Reported by: David Binderman
Found with: cppcheck --enable=style
Emil Mikulic [Thu, 1 Sep 2016 07:49:06 +0000 (17:49 +1000)]
Check bounds before using index.
Reported by: David Binderman
Found with: cppcheck --enable=style
Emil Mikulic [Mon, 28 Mar 2016 04:08:11 +0000 (15:08 +1100)]
Use :nth-child selector instead of css class to colorize tables.
Suggested by: Daniel Aleksandersen https://www.daniel.priv.no/
Emil Mikulic [Mon, 28 Mar 2016 03:50:18 +0000 (14:50 +1100)]
Update scan-build call.
Emil Mikulic [Mon, 28 Mar 2016 03:45:19 +0000 (14:45 +1100)]
chdir("/") immediately after chroot()
Suggested by clang static analyzer.
Emil Mikulic [Mon, 28 Mar 2016 03:25:21 +0000 (14:25 +1100)]
Remove un-needed include.
Emil Mikulic [Mon, 28 Mar 2016 03:22:36 +0000 (14:22 +1100)]
Constify static content.
This moves it from data pages to text pages.
Emil Mikulic [Mon, 28 Mar 2016 02:33:47 +0000 (13:33 +1100)]
Make static the options not in opt.h
Emil Mikulic [Mon, 28 Mar 2016 02:31:52 +0000 (13:31 +1100)]
Suppress noisy reserved-id-macro warning.
Emil Mikulic [Mon, 28 Mar 2016 02:24:35 +0000 (13:24 +1100)]
Serve favicon over http.
Emil Mikulic [Sun, 27 Mar 2016 08:32:23 +0000 (19:32 +1100)]
Add favicon for darkstat.
Contributed by: Daniel Aleksandersen https://www.daniel.priv.no/
Emil Mikulic [Mon, 23 Nov 2015 04:45:24 +0000 (15:45 +1100)]
Allow mobile users to zoom out.
Suggested by: Dallen Wilson
Dallen Wilson [Wed, 11 Nov 2015 22:00:26 +0000 (15:00 -0700)]
Improve graphs page display on mobile devices.
This has little to no effect on a desktop browser, but on a mobile browser, it
will automatically fit the page to the browser window, without the user having
to manually zoom or scroll left or right to see everything. This results in the
graphs being arranged in a single column, rather then a 2x2 grid, which is also
what happens on my desktop when I make the browser window narrower.
Emil Mikulic [Sat, 30 May 2015 01:28:40 +0000 (11:28 +1000)]
Update example URL for FreeBSD port update.
Emil Mikulic [Sun, 24 May 2015 07:39:38 +0000 (17:39 +1000)]
Adjust date in ChangeLog.
Emil Mikulic [Sat, 27 Dec 2014 15:35:17 +0000 (02:35 +1100)]
Update portability notes.
Emil Mikulic [Sat, 27 Dec 2014 15:27:13 +0000 (02:27 +1100)]
Fix the build on Debian GNU/Hurd.
Emil Mikulic [Sat, 27 Dec 2014 15:20:03 +0000 (02:20 +1100)]
configure: give better zlib advice for Debian.
Emil Mikulic [Sat, 27 Dec 2014 13:58:00 +0000 (00:58 +1100)]
Call setgroups() before setgid() to drop supplementary groups.
Pointed out to me by: Pavel Alexeev
Caught by rpmlint
See also: https://www.securecoding.cert.org/confluence/display/seccode/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges
Emil Mikulic [Sat, 27 Dec 2014 13:20:40 +0000 (00:20 +1100)]
Rebuild deps.
Emil Mikulic [Sat, 27 Dec 2014 13:18:43 +0000 (00:18 +1100)]
Update ChangeLog for 3.0.719.
Emil Mikulic [Sat, 27 Dec 2014 13:06:15 +0000 (00:06 +1100)]
OCD: add space to bottom of host detail page.
Emil Mikulic [Sat, 27 Dec 2014 13:04:52 +0000 (00:04 +1100)]
Implement tracking of remote ports.
Emil Mikulic [Sat, 27 Dec 2014 11:53:07 +0000 (22:53 +1100)]
Pretty sure show-dep isn't needed, also add vim modeline.
Emil Mikulic [Sat, 27 Dec 2014 11:50:02 +0000 (22:50 +1100)]
-D__OPTIMIZE__ comes from -O anyway.
Emil Mikulic [Sat, 27 Dec 2014 11:48:06 +0000 (22:48 +1100)]
test_headers.sh: handle the "#define restrict" bit in config.h
Emil Mikulic [Sat, 27 Dec 2014 09:44:40 +0000 (20:44 +1100)]
Change the default ports_max to twice ports_keep.
Emil Mikulic [Sat, 27 Dec 2014 09:38:59 +0000 (20:38 +1100)]
Stop using inline, get restrict from autoconf.
Emil Mikulic [Sat, 27 Dec 2014 09:27:54 +0000 (20:27 +1100)]
Free lists of cmdline args in the DNS child.
This is a tiny amount of memory but it brings us closer to being valgrind clean.
Emil Mikulic [Sat, 27 Dec 2014 09:19:41 +0000 (20:19 +1100)]
Add sanitizer and valgrind hints for development.
Emil Mikulic [Sat, 27 Dec 2014 09:04:31 +0000 (20:04 +1100)]
Account for all IP protocols.
Emil Mikulic [Sat, 27 Dec 2014 08:47:00 +0000 (19:47 +1100)]
Make SIGUSR1 reset reported time and counters.
Emil Mikulic [Sat, 27 Dec 2014 08:19:18 +0000 (19:19 +1100)]
Use labs(long).
Emil Mikulic [Sun, 7 Dec 2014 09:56:43 +0000 (20:56 +1100)]
Fix use-after-free in http_stop().
Emil Mikulic [Sun, 7 Dec 2014 09:51:24 +0000 (20:51 +1100)]
Correctly show "last seen: never" on the host details page.
Emil Mikulic [Sun, 7 Dec 2014 06:37:38 +0000 (17:37 +1100)]
Fix "clock error" due to machine reboot.
Treat per-host last_seen_mono as a signed integer which can go negative
if the host was last seen before reboot (or whatever corresponds to t=0
on the monotonic clock)
Emil Mikulic [Sun, 7 Dec 2014 06:19:03 +0000 (17:19 +1100)]
Indent, no functional change.
Emil Mikulic [Sun, 7 Dec 2014 05:59:09 +0000 (16:59 +1100)]
Update export-format.txt to match hosts_db.c
last_seen is stored before the MAC address.
Pointed out by: Trond Endrestol
Emil Mikulic [Sun, 7 Dec 2014 05:41:27 +0000 (16:41 +1100)]
Website URL: http -> https
Emil Mikulic [Sun, 7 Dec 2014 05:40:27 +0000 (16:40 +1100)]
Add README.git notes.
Emil Mikulic [Sun, 7 Dec 2014 05:36:01 +0000 (16:36 +1100)]
Turn two unreachable statements into errx().
Emil Mikulic [Sun, 7 Dec 2014 05:12:15 +0000 (16:12 +1100)]
Exit (instead of busy-loop) when the interface goes down.
Emil Mikulic [Fri, 14 Mar 2014 10:56:38 +0000 (21:56 +1100)]
Update COPYING.GPL
The new one is taken from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
and has an updated street address for the Free Software Foundation, Inc.
www.gnu.org says: Last-Modified: Tue, 23 Mar 2010 23:34:05 GMT
Reported by: Pavel Alexeev <pahan@hubbitus.info>
Found with: rpmlint
Emil Mikulic [Sat, 25 Jan 2014 11:30:56 +0000 (22:30 +1100)]
Update ChangeLog for 3.0.718.
Emil Mikulic [Sat, 25 Jan 2014 11:13:39 +0000 (22:13 +1100)]
Bump copyright years.
Jürgen Kahrs MediaMobil [Sat, 25 Jan 2014 10:55:40 +0000 (21:55 +1100)]
contrib/darkstat_export converts the binary export (.db file) into .csv format.
Emil Mikulic [Sat, 25 Jan 2014 10:51:42 +0000 (21:51 +1100)]
Don't chroot() by default.
Don't detect default chroot dir in the configure script.
The motivation behind this is to no longer fail to configure when /var/empty
doesn't exist, which is the case on most distros.
Emil Mikulic [Sat, 25 Jan 2014 10:34:51 +0000 (21:34 +1100)]
Hint on how to view the manpage.
Emil Mikulic [Sat, 25 Jan 2014 10:25:01 +0000 (21:25 +1100)]
Make base url optional.
Requested by: Lonnie Abelbeck
Emil Mikulic [Sat, 25 Jan 2014 10:04:25 +0000 (21:04 +1100)]
Bring back the --base functionality.
This is mostly a rollback of "Replace the --base code with relative paths."
except we keep the relative paths.
Requested by: Lonnie Abelbeck
Emil Mikulic [Sat, 25 Jan 2014 09:36:32 +0000 (20:36 +1100)]
Use llu.
Emil Mikulic [Sat, 25 Jan 2014 09:35:38 +0000 (20:35 +1100)]
Add explicit warning about blank graphs due to no localips.
Emil Mikulic [Sat, 25 Jan 2014 09:24:11 +0000 (20:24 +1100)]
xasprintf() size_t as %qu with cast.
Emil Mikulic [Sat, 25 Jan 2014 09:18:46 +0000 (20:18 +1100)]
Don't die from assert() in timer_stop() if time goes backwards.
Emil Mikulic [Sat, 25 Jan 2014 09:11:41 +0000 (20:11 +1100)]
Make timer around pcap_dispatch() tighter.
Emil Mikulic [Sat, 25 Jan 2014 09:09:23 +0000 (20:09 +1100)]
make depend
Emil Mikulic [Sat, 25 Jan 2014 09:08:21 +0000 (20:08 +1100)]
Fix more clang warnings.
Emil Mikulic [Sat, 25 Jan 2014 09:02:29 +0000 (20:02 +1100)]
Add assert() to soothe Clang static analyzer.
Emil Mikulic [Sat, 25 Jan 2014 09:01:14 +0000 (20:01 +1100)]
Fix memory leak.
Found with Clang static analyzer.
Emil Mikulic [Sat, 25 Jan 2014 08:43:32 +0000 (19:43 +1100)]
Add assert()s to tree.h to soothe Clang static analyzer.
Emil Mikulic [Sat, 25 Jan 2014 08:30:34 +0000 (19:30 +1100)]
Fix some clang warnings.
Emil Mikulic [Sat, 25 Jan 2014 08:21:18 +0000 (19:21 +1100)]
Add header sentinel to str.h
Emil Mikulic [Sat, 25 Jan 2014 08:18:50 +0000 (19:18 +1100)]
Quiet format string warnings in graph_db.
Emil Mikulic [Sat, 25 Jan 2014 08:05:40 +0000 (19:05 +1100)]
Fix type errors in format strings in hosts_db and use time_t instead of long.
Emil Mikulic [Sat, 25 Jan 2014 08:02:18 +0000 (19:02 +1100)]
Define qu and llu in str.h and _Static_assert that they're 64 bits.
Emil Mikulic [Sat, 25 Jan 2014 07:51:16 +0000 (18:51 +1100)]
Explicitly initialize last_real time.
Emil Mikulic [Sat, 25 Jan 2014 07:45:57 +0000 (18:45 +1100)]
Fix type errors in daylog.c format strings, and use time_t instead of long.
Emil Mikulic [Sat, 25 Jan 2014 07:31:10 +0000 (18:31 +1100)]
Mark _printflike_ things so we get format warnings.
Emil Mikulic [Sat, 25 Jan 2014 07:05:03 +0000 (18:05 +1100)]
Rename daylog_fn to opt_daylog_fn when parsing options.
This avoids using the same name as a different daylog_fn
in the daylog.c module.
Emil Mikulic [Sat, 25 Jan 2014 09:37:11 +0000 (20:37 +1100)]
Use time_t instead of long.
Remi Locherer [Sat, 25 Jan 2014 07:00:48 +0000 (18:00 +1100)]
An attempt at trying to fix the time_t related issues with darkstat.
Replace some longs with time_t. Fixes darkstat on 32-bit archs.
Emil Mikulic [Sat, 25 Jan 2014 07:19:56 +0000 (18:19 +1100)]
Developer helper scripts for compiler warnings and clang analyzer.
Emil Mikulic [Wed, 14 Aug 2013 09:56:18 +0000 (19:56 +1000)]
Add release checklist.
Emil Mikulic [Wed, 14 Aug 2013 09:15:39 +0000 (19:15 +1000)]
Update ChangeLog for 3.0.717.
Emil Mikulic [Wed, 14 Aug 2013 09:13:23 +0000 (19:13 +1000)]
Order NEWS by version.
Emil Mikulic [Wed, 14 Aug 2013 09:07:38 +0000 (19:07 +1000)]
Fix crash due to str_appendf() not understanding %ld
Thanks to James Lay and Tim Bradshaw for reporting this.
Emil Mikulic [Sun, 11 Aug 2013 13:11:09 +0000 (23:11 +1000)]
Fake up clock_gettime() on OS X.
Thanks to Tim Bradshaw for reporting this and testing patches.
Emil Mikulic [Thu, 8 Aug 2013 10:30:38 +0000 (20:30 +1000)]
Update ChangeLog for 3.0.716.
Emil Mikulic [Tue, 6 Aug 2013 09:58:45 +0000 (19:58 +1000)]
We need at least autoconf 2.64 for PACKAGE_URL.
Emil Mikulic [Tue, 6 Aug 2013 09:23:18 +0000 (19:23 +1000)]
Add instructions for building darkstat from git.
Emil Mikulic [Tue, 6 Aug 2013 09:03:00 +0000 (19:03 +1000)]
Check for getifaddrs() in libc before ifaddrs.h
Reported by: Andrej Kralj
He found a platform where the header exists but the library code doesn't.
Emil Mikulic [Tue, 6 Aug 2013 08:40:36 +0000 (18:40 +1000)]
Make configure --enable-warnings use {all,extra}-warnings with GCC.
And -Weverything with clang.
Emil Mikulic [Sun, 24 Feb 2013 04:26:07 +0000 (15:26 +1100)]
Improve the configure script's libpcap instructions.
Explicitly name the Debian package.
Emil Mikulic [Mon, 12 Nov 2012 08:01:00 +0000 (19:01 +1100)]
Use time_t instead of long in graph_db.c
Emil Mikulic [Sun, 8 Jul 2012 12:15:37 +0000 (22:15 +1000)]
Run pcap_dispatch() even if the pcap fd isn't in the read set.
Without this, use of the web interface can delay packet capture.
Emil Mikulic [Sun, 8 Jul 2012 11:45:22 +0000 (21:45 +1000)]
Change listen() backlog from -1 to 128.
Without this change, I get occasional second-long pauses (TCP SYN
retransmit delay) when the darkstat http server is running on
NetBSD 5.1.2, because it interprets -1 as 1 and ignores simultaneous
connection attempts.
Emil Mikulic [Sun, 8 Jul 2012 11:41:10 +0000 (21:41 +1000)]
Set the listening socket non-blocking before we accept() on it.
This has not come up as a problem before, but it's a good idea.
Emil Mikulic [Sun, 8 Jul 2012 11:38:59 +0000 (21:38 +1000)]
Remove extraneous include.
Emil Mikulic [Sun, 8 Jul 2012 10:11:44 +0000 (20:11 +1000)]
Only time the processing part of the event loop.
It's fine for select() to take a long time if there's no traffic.
Emil Mikulic [Sun, 8 Jul 2012 09:45:47 +0000 (19:45 +1000)]
localip: don't complain about unknown sa_family.
There are many possible families and we care about
precisely two of them (IPv4 and IPv6)
Emil Mikulic [Sun, 8 Jul 2012 09:38:11 +0000 (19:38 +1000)]
FreeBSD build warning fixes.
Emil Mikulic [Sun, 8 Jul 2012 09:24:42 +0000 (19:24 +1000)]
Implement support for multiple capture interfaces.
Emil Mikulic [Sun, 8 Jul 2012 07:06:11 +0000 (17:06 +1000)]
Warn if the event loop or pcap_dispatch are too slow.
Emil Mikulic [Sun, 8 Jul 2012 06:56:29 +0000 (16:56 +1000)]
Use a monotonic clock where appropriate.
- Host last seen time (although we have to launder it to/from real time
when dealing with export files)
- Time since localip_update (this fixes a long-standing FIXME)
- HTTP timeouts.
Emil Mikulic [Sat, 7 Jul 2012 09:26:20 +0000 (19:26 +1000)]
Simplify daylog code.
Emil Mikulic [Sat, 7 Jul 2012 08:42:20 +0000 (18:42 +1000)]
test_headers: show progress.
Emil Mikulic [Sat, 7 Jul 2012 06:41:50 +0000 (16:41 +1000)]
Retire pktsummary.time - it isn't used.
Emil Mikulic [Sat, 7 Jul 2012 06:33:47 +0000 (16:33 +1000)]
Clean up decode module.
- cap calls into decode, then acct.
- Decode functions can return 0 on failure.
Emil Mikulic [Mon, 2 Jul 2012 16:09:08 +0000 (02:09 +1000)]
Don't do accounting if decode_ip[v6] fails.
Otherwise we get a crash later due to a bogus address family.
Reported by: Mate Juros