Change the default 'rhizome.datastore_path' to "rhizome", ie, a sub-
directory of the instance directory.
Add a new erename() operation to "os.h".
Clean up the code around the fix 39f582cca (two commits ago) for a bug
introduced in 2014: the 'rhizome.db' file was always being created in
the instance directory, regardless of the setting of the
'rhizome.datastore_path' config option.
Whenever the Rhizome database is opened (by the server or by a CLI
invocation), if the database file does not exist but there is a
'rhizome.db' file in the legacy location, then move that file (and any
accompanying "blob" and "hash" sub-directories) to the configured
location.
Update copyright notices.
Was failing because recvmsg(2) on OSX does not nul terminate the
pathname of local (AF_UNIX) sockets in the returned sockaddr buffer.
Zerofilling the buffer before calling recvmsg() does the trick.
In the process, improved debug and error logging, replacing
recvwithttl() with recv_message() and recv_message_frag(). The
mdp_net.c source file was retired.
Original DEBUG() and DEBUGF() macros renamed to _DEBUG() and _DEBUGF()
New DEBUG() and DEBUGF() macros, first argument is flagname
New DEBUGF2(foo, bar, ...) macro does if(config.debug.foo||config.debug.bar) test
Replace almost all config.debug.xxx references to IF_DEBUG(xxx)
Make .o files in separate subdirectories for servald and library
Factor struct __sourceloc and __WHENCE__ from "log.h" into "whence.h"
Factor sid_t etc from "serval.h" into "serval_types.h"
Factor rhizome_bid_t etc from "rhizome.h" into "rhizome_types.h"
Do not include "serval.h" in library sources
Add log_stderr.c and logMessage.c for stand-alone executables
Packet stats now exclude duplicate pong replies
With <count> arg, exits immediately once a pong has been received for
every ping, unless new --wait-for-duplicates option given
Routing tests for unreliable links now assert all pongs received and
very few duplicates
If no instance directory specified, then use paths like
/etc/serval/serval.conf
/var/cache/serval
/var/log/serval
/var/run/serval
etc. for files, instead of all in a single directory.
Log all directory creation as INFO messages.
Interpretation of log.file.directory_path has changed slightly.
Updated servald configuration tech doc.
Add struct sockaddr_in 'inet' union field, rename 'addr_un' union field
to 'local'
Replace recvwithttl()'s (struct sockaddr *) and socklen_t pair of args
with single (struct socket_address *) arg
The recently added cmp_sockaddr() function does not call stat(2) any
more to compare local AF_UNIX socket address paths, so not it is stable
enough to use for ordering sockaddr structs.
New function: real_sockaddr() converts the file path of a local AF_UNIX
file socket using realpath(3). The MDP client uses it on the sender
address of every MDP reply packet it receives to ensure that symlinks in
the instance path do not cause MDP client failures.
Rename recently added socket_setname() function: make_local_sockaddr().
Finish the work started by Daniel in 2012, by using abstract local
AF_UNIX sockets on platforms that support them (Linux, Android).
Fix all sorts of bugs and issues that prevented the existing MDP and
Monitor client and server code from working with abstract socket names.
Handle selection between normal & abstract sockets in a single place.
overlay_mdp.c tried to have both but this seems like a bug so I've removed the second socket (needs tests).
This consistently handles abstract vs normal sockets with a single switch.
overlay mdp tries to have both (abstract & normal) but the code paths seem different, I have consolidated them.
Needs more testing.