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
Emil Mikulic [Sun, 1 Jul 2012 15:11:37 +0000 (01:11 +1000)]
Ignore IPv6 packets with extension headers.
Previously we would emit "unknown proto" warnings.
Emil Mikulic [Sun, 1 Jul 2012 14:26:18 +0000 (00:26 +1000)]
Support multiple local IPs on an interface.
Emil Mikulic [Tue, 19 Jun 2012 15:35:03 +0000 (01:35 +1000)]
Don't inline swap64(), to fix a warning.
Emil Mikulic [Mon, 11 Jun 2012 10:19:28 +0000 (20:19 +1000)]
Add ifdefs around decode_linux_sll implementation.
Noticed on OpenBSD 5.1
Emil Mikulic [Mon, 11 Jun 2012 09:48:55 +0000 (19:48 +1000)]
Fix "assuming signed overflow does not occur" warning.
Emil Mikulic [Mon, 11 Jun 2012 09:35:00 +0000 (19:35 +1000)]
Define ETHERTYPE_IPV6 ourselves.
Instead of trying to get it through <net/if_ether.h>.
Remove the autoconf check for this header.
Emil Mikulic [Mon, 11 Jun 2012 09:33:41 +0000 (19:33 +1000)]
Compatibility fixes for NetBSD 5.1.2
Emil Mikulic [Thu, 3 May 2012 15:03:13 +0000 (01:03 +1000)]
Fix format warning.
Emil Mikulic [Thu, 3 May 2012 14:49:25 +0000 (00:49 +1000)]
Don't err() if we can't create one socket for http.
We try to create several, and error out later if we don't succeed in
creating any.
Emil Mikulic [Thu, 1 Mar 2012 09:59:12 +0000 (20:59 +1100)]
Cosmetic: capitalize.
Emil Mikulic [Thu, 1 Mar 2012 09:58:58 +0000 (20:58 +1100)]
Improve error message when binding http port.
Emil Mikulic [Thu, 1 Mar 2012 09:33:22 +0000 (20:33 +1100)]
We don't use inet_aton anymore, drop the <arpa/inet.h> includes.
Emil Mikulic [Thu, 1 Mar 2012 09:32:24 +0000 (20:32 +1100)]
Look for hstrerror in -lresolv.
Suggested by: Bernd Schemmer, for Solaris 10
Emil Mikulic [Thu, 1 Mar 2012 09:24:12 +0000 (20:24 +1100)]
Drop -Wlong-long
Emil Mikulic [Thu, 1 Mar 2012 09:20:06 +0000 (20:20 +1100)]
Turn a switch() with no default case into an explicit if+assert.
Emil Mikulic [Thu, 1 Mar 2012 09:19:49 +0000 (20:19 +1100)]
Include bsd/{string,unistd}.h if present.
Emil Mikulic [Mon, 23 Jan 2012 03:47:27 +0000 (19:47 -0800)]
Update ChangeLog for darkstat 3.0.715
Emil Mikulic [Mon, 23 Jan 2012 02:53:44 +0000 (18:53 -0800)]
Make decode_null separate from decode_loop.
This fixes OpenBSD storing family in host-order in the null case.
Emil Mikulic [Mon, 23 Jan 2012 01:52:50 +0000 (17:52 -0800)]
More diagnostics when socket() fails.
Emil Mikulic [Mon, 12 Sep 2011 10:45:55 +0000 (20:45 +1000)]
Detection of multicast IPv4 addresses was looking at the wrong end.
Emil Mikulic [Sun, 11 Sep 2011 10:30:41 +0000 (20:30 +1000)]
Fall back to gethostbyaddr() If getnameinfo() fails.
Original patch from: Shaun Wallace
Emil Mikulic [Sun, 17 Jul 2011 05:50:08 +0000 (15:50 +1000)]
Make failure to get localip non-fatal.
Emil Mikulic [Sun, 17 Jul 2011 05:37:03 +0000 (15:37 +1000)]
Simplify HAVE_ vs HAVE_REAL_
Emil Mikulic [Sun, 17 Jul 2011 05:06:42 +0000 (15:06 +1000)]
Close unlikely race: don't reset before export.
Emil Mikulic [Sun, 17 Jul 2011 05:01:35 +0000 (15:01 +1000)]
ifa_addr can be NULL.
Emil Mikulic [Sun, 17 Jul 2011 04:51:37 +0000 (14:51 +1000)]
Implement --local-only
I've had a couple of requests for restricting accounting to the local net.
Emil Mikulic [Sun, 26 Jun 2011 12:18:10 +0000 (22:18 +1000)]
Split out newer GCC warning flags into a separate check.
FreeBSD's system compiler is too old to recognize them.
Malte S. Stretz [Wed, 22 Jun 2011 20:27:53 +0000 (22:27 +0200)]
Bail out early if the request is too large.
There is no point parsing the request first.
Malte S. Stretz [Wed, 22 Jun 2011 20:23:58 +0000 (22:23 +0200)]
Remove an unnecessary define.
Malte S. Stretz [Wed, 22 Jun 2011 20:21:33 +0000 (22:21 +0200)]
Some small free() fixups.
* No need to check for NULL before free().
* Early free() conn->request in the same function where it was
allocated.
Emil Mikulic [Sun, 26 Jun 2011 06:56:20 +0000 (16:56 +1000)]
Fix up includes.
Malte S. Stretz [Mon, 20 Jun 2011 13:32:52 +0000 (15:32 +0200)]
Move *BSD compatibility layer to extra file.
This makes it easier to silence some warnings.
Malte S. Stretz [Mon, 20 Jun 2011 14:01:36 +0000 (16:01 +0200)]
Fix up pretty printing.
* Add *_HOSTCC, *_LINK and *_CIFY macros to avoid confusion.
* Move cruft to the bottom where nobody sees it.
Emil Mikulic [Tue, 21 Jun 2011 12:38:13 +0000 (22:38 +1000)]
Only update lastseen time for sender, not recipient.
Suggested by: Madhu
Emil Mikulic [Tue, 21 Jun 2011 12:33:24 +0000 (22:33 +1000)]
last_seen -> lastseen, for consistency.
Emil Mikulic [Tue, 21 Jun 2011 10:15:55 +0000 (20:15 +1000)]
Make bind() failure nonfatal.
Malte S. Stretz [Thu, 9 Jun 2011 14:05:43 +0000 (16:05 +0200)]
Tune version/usage output.
Emil Mikulic [Mon, 20 Jun 2011 13:17:32 +0000 (23:17 +1000)]
Abort release if there are uncommitted changes.
Emil Mikulic [Mon, 20 Jun 2011 13:12:24 +0000 (23:12 +1000)]
Make test_headers return an appropriate exit code.
Emil Mikulic [Mon, 20 Jun 2011 13:01:40 +0000 (23:01 +1000)]
Fix release.sh order.
Run test_headers after getting an up-to-date config.h
Emil Mikulic [Mon, 20 Jun 2011 12:46:15 +0000 (22:46 +1000)]
Restore pre-IPv6 localip_update() code for systems without ifaddrs.h
Requested by: Prof Abimbola Olowofoyeku for Routertech (uses uclibc)
Emil Mikulic [Mon, 20 Jun 2011 12:28:05 +0000 (22:28 +1000)]
Improve test_headers.sh: MIN shouldn't match RB_MIN
Malte S. Stretz [Thu, 9 Jun 2011 13:00:17 +0000 (15:00 +0200)]
Explicitly enable IPV6_V6ONLY.
It defaults to off on Linux and on on BSD. Except when it doesn't.
See also <http://www.ipv6style.jp/en/apps/
20030829/index.shtml>.
I'd vote for disabling it instead. But: OpenBSD doesn't allow this
since is so utterly insecure... dude... just get off my lawn.
See also <http://utcc.utoronto.ca/~cks/space/blog/linux/Ipv6DualBinding>
Emil Mikulic [Mon, 20 Jun 2011 12:17:14 +0000 (22:17 +1000)]
Implement automake-style silent-rules
Prompted by: Malte S. Stretz
Malte S. Stretz [Tue, 14 Jun 2011 09:00:43 +0000 (11:00 +0200)]
Enable link-time optimization.
Results in a 15% smaller (and probably quicker) binary.
Malte S. Stretz [Tue, 31 May 2011 23:45:26 +0000 (01:45 +0200)]
Suppress a printf warning by using the proper format.
Malte S. Stretz [Thu, 9 Jun 2011 14:42:41 +0000 (16:42 +0200)]
Mark MIN and MAX as macros as they have side effects.
Emil Mikulic [Mon, 20 Jun 2011 10:50:17 +0000 (20:50 +1000)]
s6_addr32 compatibility for OpenSolaris
Submitted by: Mats Erik Andersson
Reminded by: Bernd Schemmer
Emil Mikulic [Thu, 9 Jun 2011 12:21:10 +0000 (22:21 +1000)]
Use strtol instead of strtonum.
Emil Mikulic [Thu, 9 Jun 2011 12:10:35 +0000 (22:10 +1000)]
Explain Linux workaround for binding to all addresses.
Requested by: Malte S. Stretz
Emil Mikulic [Thu, 9 Jun 2011 11:55:22 +0000 (21:55 +1000)]
Don't use AI_ADDRCONFIG.
Malte says without this:
It fails with "Address family for hostname not supported: Device or
resource busy" if IPv6 is requested (eg. if no bind address was
specified under Linux) but no interface has IPv6 configured (::1/128
and fe80::/64 do not count).
Malte S. Stretz [Wed, 8 Jun 2011 12:33:59 +0000 (14:33 +0200)]
Add license blurb to darkproxy.php.
Feel free to do whatever you like with this trivial code.
Malte S. Stretz [Tue, 31 May 2011 10:26:05 +0000 (12:26 +0200)]
Clean up Makefile.in to simplify future patching.
* Add STATICHS macro.
* Split clean rule.
* Mark phony targets.
Malte S. Stretz [Fri, 3 Sep 2010 09:07:31 +0000 (11:07 +0200)]
Ignore release files.
Malte S. Stretz [Fri, 3 Sep 2010 09:37:31 +0000 (11:37 +0200)]
Fix file name in comment.
Emil Mikulic [Thu, 9 Jun 2011 11:34:07 +0000 (21:34 +1000)]
Max domain name length is 255, not MAXHOSTNAMELEN
This should fix a build failure on Hurd (!)
Thanks to: Rene Mayorga and the Debian project.
Emil Mikulic [Mon, 6 Jun 2011 10:47:56 +0000 (20:47 +1000)]
Whoops, I included sys/types in the wrong file.
Suggested by: Chris Kuethe
Emil Mikulic [Sat, 4 Jun 2011 14:17:52 +0000 (00:17 +1000)]
Update ChangeLog.
Emil Mikulic [Sun, 15 May 2011 12:44:44 +0000 (22:44 +1000)]
make depend
Emil Mikulic [Sat, 4 Jun 2011 13:58:37 +0000 (23:58 +1000)]
Automate release more - run test, make depend.
Also, use "tar chof" to get ustar format.
Malte S. Stretz [Wed, 1 Jun 2011 11:31:53 +0000 (13:31 +0200)]
Update date in manpage.
Emil Mikulic [Sat, 4 Jun 2011 13:29:32 +0000 (23:29 +1000)]
Bump copyright years.
Emil Mikulic [Sat, 4 Jun 2011 13:18:05 +0000 (23:18 +1000)]
Homepage is moving to a sillier domain.
Emil Mikulic [Sat, 4 Jun 2011 12:58:23 +0000 (22:58 +1000)]
Factor and add checks for cdefs.h
Emil Mikulic [Sat, 4 Jun 2011 12:58:29 +0000 (22:58 +1000)]
Remove includes of darkstat.h, add cdefs.h where needed.
Emil Mikulic [Sat, 4 Jun 2011 13:00:37 +0000 (23:00 +1000)]
cp darkstat.h cdefs.h
Emil Mikulic [Sat, 4 Jun 2011 12:40:35 +0000 (22:40 +1000)]
Fix warnings.
Emil Mikulic [Sat, 4 Jun 2011 10:21:56 +0000 (20:21 +1000)]
Use multiple listening sockets, allow multiple bindaddrs.
Emil Mikulic [Sat, 4 Jun 2011 11:31:40 +0000 (21:31 +1000)]
Be explicit that per-host pages are directories.
Browsers get confused by double colons in v6 addresses.
Malte S. Stretz [Wed, 1 Jun 2011 15:44:57 +0000 (17:44 +0200)]
Add missing opt.h to release script.
Emil Mikulic [Sat, 4 Jun 2011 08:21:43 +0000 (18:21 +1000)]
Remove unnecessary header sentinel.
Malte S. Stretz [Wed, 1 Jun 2011 11:30:13 +0000 (13:30 +0200)]
Replace the --base code with relative paths.
Most of the functionality turned out to be overkill since
relative paths work fine, too. The only broken thing is
lighttpd 1.4 which doesn't support proxying of stuff like
/darkstat/ -> http://localhost:667/
But this will be fixed properly in mod_proxy_core in 1.5
once (if ever) it is released.
Malte S. Stretz [Tue, 31 May 2011 23:01:10 +0000 (01:01 +0200)]
Avoid linking against nsl and resolv unless required.
Malte S. Stretz [Tue, 31 May 2011 22:08:40 +0000 (00:08 +0200)]
libbsd provides (a stub for) setproctitle, too.
Emil Mikulic [Sat, 4 Jun 2011 07:59:33 +0000 (17:59 +1000)]
Check for missing and extraneous config.h includes.
Emil Mikulic [Sat, 4 Jun 2011 07:52:59 +0000 (17:52 +1000)]
Make test_headers more automatic.
Also make the output prettier.
Emil Mikulic [Sat, 4 Jun 2011 06:21:47 +0000 (16:21 +1000)]
Include config.h explicitly.
Emil Mikulic [Sat, 4 Jun 2011 06:06:20 +0000 (16:06 +1000)]
Include opt.h explicitly.
Malte S. Stretz [Tue, 31 May 2011 13:27:18 +0000 (15:27 +0200)]
Drop interface from html_open, use global opt_interface.
Malte S. Stretz [Tue, 31 May 2011 13:22:49 +0000 (15:22 +0200)]
Prefix all global variables to aid debugging.
* Also move all options which are set in darkstat.c to a new
header opt.h and prefix options with opt_.
* Declare all opt_* stuff in darkstat.c.
* Prefix globals from acct.c with acct_.
* Prefix globals from cap.c with cap_.
* Prefix globals from hosts_db.c with hosts_db_.
* Prefix globals from http.c with http_.
Malte S. Stretz [Thu, 2 Sep 2010 21:52:58 +0000 (23:52 +0200)]
Rename str_append2() to str_appendn().
Clearifies the difference to str_append (ie. append n bytes), mnemonic:
str_appendn is to str_append what strncat is to strcat.
Emil Mikulic [Mon, 30 May 2011 11:44:32 +0000 (21:44 +1000)]
Change example to discourage use of hyphen (-rc1)
Ports doesn't like hyphens there.
Emil Mikulic [Mon, 30 May 2011 11:38:10 +0000 (21:38 +1000)]
Use PACKAGE_URL.
- Use PACKAGE_strings directly instead of through %s indirection.
- Reduce duplication by removing URL from AUTHORS and README.
Malte S. Stretz [Fri, 3 Sep 2010 09:06:23 +0000 (11:06 +0200)]
Add homepage URL to AC_INIT.
This sets PACKAGE_URL in config.h.
Malte S. Stretz [Fri, 3 Sep 2010 09:05:25 +0000 (11:05 +0200)]
Use sed to set the version number.
Malte S. Stretz [Fri, 3 Sep 2010 09:04:31 +0000 (11:04 +0200)]
Use separate output function, fix eval.
Emil Mikulic [Mon, 30 May 2011 11:29:22 +0000 (21:29 +1000)]
Add sys/types.h includes for OpenBSD.
Suggested by: Chris Kuethe
Emil Mikulic [Sun, 29 May 2011 05:15:59 +0000 (15:15 +1000)]
Simplify how the http socket is bound.
- Use dual-stack socket for wildcard.
- Sadly, AI_V4MAPPED doesn't work on FreeBSD 8.2
Emil Mikulic [Tue, 24 May 2011 12:29:38 +0000 (22:29 +1000)]
Retire DARKSTAT_USES_HOSTENT conditional code.
Emil Mikulic [Mon, 23 May 2011 13:50:07 +0000 (23:50 +1000)]
Show base_url in "listening on" output.
Emil Mikulic [Mon, 23 May 2011 13:44:52 +0000 (23:44 +1000)]
Put fewer slashes into the slashed_url.
Emil Mikulic [Sun, 15 May 2011 14:16:28 +0000 (00:16 +1000)]
Add addr module and autogenerated files to release tarball.