Commit Graph

3110 Commits

Author SHA1 Message Date
Andrew Bettison
5035abde34 Improve test framework: assert_fork_is_running
Also assert_fork_is_not_running
Added 'framework' test case for fork primitives
2014-04-30 11:10:20 +09:30
Andrew Bettison
525aee88c5 Fix test framework bug: needed shopt -s extglob 2014-04-30 11:08:53 +09:30
Andrew Bettison
ea9de737a2 MDP packet filter rules configuration
Configurable rules file path: mdp.filter_rules_path

Add filter rules parsing code, add filtering to outgoing as well as
incoming packets

New test script: tests/mdp with two test cases

Improve test defs: new execute_servald() function

Widen MDP port number format from 8 to ten chars to accommodate leading
"0x"
2014-04-29 15:31:50 +09:30
Andrew Bettison
78d0e29768 Improve test framework: shell backtrace from forks
Was not showing the point where the fork() was invoked
2014-04-29 15:09:18 +09:30
Andrew Bettison
00dc3bf27e Fix Rhizome manifest parsing bug
If an over-large manifest was supplied, signature extraction went
into a tight loop
2014-04-29 15:08:02 +09:30
Andrew Bettison
684735b11c Fix config file timestamp bug
Ensure that timestamp always advances by at least one second every time
the config file is modified, add test case

Refactor test defs: detecting started HTTPD is not specific to Rhizome

Refactor struct file_meta and associated functions into "io.h" and io.c

Add various strbuf helper functions for formatting struct timespec
and struct file_meta to assist debug logging
2014-04-29 15:04:20 +09:30
Andrew Bettison
e80cce72a0 Configurable MOTD (Message of the Day) on HTTPD root page
Also improve root page HTML: change <br> to <br />
2014-04-29 13:57:29 +09:30
Andrew Bettison
008dd6ab21 Add size_t arg to strn_to_sid_t() 2014-04-29 13:39:21 +09:30
Andrew Bettison
c222727a46 Add malloc_read_whole_file()
Use to implement read_whole_file()
2014-04-29 12:36:58 +09:30
Andrew Bettison
c17fb19bd4 Add strn_to_uint32()
Use to implement str_to_unit32()
2014-04-29 12:28:20 +09:30
Andrew Bettison
ad8d02827b Change all str_to_int 'base' args from int to unsigned 2014-04-29 12:18:45 +09:30
Andrew Bettison
459c5a2303 Improve "mdp ping" command
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
2014-04-17 16:09:34 +09:30
Andrew Bettison
8bc746af25 New "config sync" command 2014-04-16 19:28:16 +09:30
Andrew Bettison
6859b85731 Improve "mdp_client.h" layout and comments 2014-04-16 19:28:16 +09:30
Andrew Bettison
7e71870093 mdp_send() and mdp_recv() do not pass zero-length buffer in iovec 2014-04-16 19:28:16 +09:30
Andrew Bettison
67e3079aa3 Fix return value of mdp_send() 2014-04-16 19:28:11 +09:30
Andrew Bettison
5d9e3f1287 New config option: 'debug.config'
Logs some information about configuration file loading and re-loading
2014-04-16 19:12:01 +09:30
Andrew Bettison
d022bbdf27 New config option: server.config_reload_interval_ms 2014-04-16 18:24:16 +09:30
Andrew Bettison
2716228074 Add server watchdog and config reload test 2014-04-16 18:06:27 +09:30
Andrew Bettison
c7d6ce71d5 Fix "mdp ping" to exit after <count> pongs 2014-04-15 15:03:41 +09:30
Jeremy Lakeman
c6e461bcb0 Attempt to create folders for binding AF_UNIX sockets 2014-04-11 17:00:47 +09:30
gardners
1dc09f513c Document MSP API 2014-04-11 11:24:50 +09:30
Jeremy Lakeman
14be44d211 Enhance console command to allow multiple concurrent calls 2014-04-10 13:46:07 +09:30
Jeremy Lakeman
23cb4600e2 Improve VOMP testing 2014-04-10 11:14:46 +09:30
Andrew Bettison
bb677e50fd Refactor keyring open/seed out of server()
Now the keyring is opened and seeded before the server daemon process is
forked, and any keyring error prevents the server from starting

No longer necessary to pass a (cli_parsed*) argument to server()
2014-04-07 16:22:31 +09:30
Andrew Bettison
6371203703 Finish removing SLIP code and test case
More simplification of "serval.h"
2014-04-07 16:22:31 +09:30
Jeremy Lakeman
1228df2b70 Remove bitrot related to voip testing 2014-04-07 15:48:10 +09:30
Jeremy Lakeman
025726dcab Fix android build, related to issue #76 fix 2014-04-07 15:25:43 +09:30
Andrew Bettison
1f49ee47ae Add missing copyright messages 2014-04-07 14:39:21 +09:30
Andrew Bettison
97850835da Clean up "serval.h" a bit
Move some defs to more appropriate header file
Remove unused function prototypes
Remove unused SLIP and CRC32 code
2014-04-07 14:27:32 +09:30
Jeremy Lakeman
81d349211a Remove spurius include of netinet/if_ether.h, fixes #76 2014-04-07 13:22:39 +09:30
Jeremy Lakeman
dd9f5fb713 Only report that a payload exists if it actually exists 2014-04-07 13:22:27 +09:30
Andrew Bettison
938d645dbd Create skeleton MSP tech document 2014-04-07 12:12:53 +09:30
Andrew Bettison
1dea703d18 Remove spurious rotbuf_log() declaration, fixes #75 2014-04-03 10:43:14 +10:30
Andrew Bettison
76cce8fe7e Fix enum compiler warnings (clang -Wenum-conversion) 2014-04-03 10:36:38 +10:30
Jeremy Lakeman
f6f1752437 Shortcut equals test when objects are the same instance 2014-03-27 13:32:15 +10:30
Jeremy Lakeman
89f6d533cd Don't report error when dropping a packet due to no peers 2014-03-27 13:31:43 +10:30
Jeremy Lakeman
2226a529af Use slightly cheaper JNI exception test 2014-03-27 13:30:46 +10:30
Andrew Bettison
ba44088eb8 Move Android INSTANCE_PATH from instance.c to Android.mk 2014-03-26 16:07:28 +10:30
Andrew Bettison
53c1b1c04c Filesystem Heirarchy Standard (FHS) paths
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.
2014-03-26 15:35:43 +10:30
Andrew Bettison
d228165814 New "instance.h" header
Remove unused
2014-03-24 15:29:57 +10:30
Andrew Bettison
53d5a8734b Fix Rhizome cleanup to remove temporary payloads
Fix test case to properly assert that all stale payloads are
deleted
2014-03-18 16:03:26 +10:30
Andrew Bettison
dc588e964d Fix "name=/file" bug in Rhizome add
Improved Rhizome test scripts and added new assert_manifest_fields()
function to Rhizome test defs
2014-03-12 15:48:00 +10:30
Jeremy Lakeman
a6d6175576 Add config set warning if attempting to drop packets on datagram sockets 2014-03-12 14:55:46 +10:30
Jeremy Lakeman
2e4835d7d6 Ensure tests with packet filtering are using the dummy network interface 2014-03-12 14:32:59 +10:30
Jeremy Lakeman
f0ce85bd8d Throw an explicit error instead of a NullPointerException 2014-03-12 14:32:59 +10:30
Jeremy Lakeman
ee68856878 Reduce log spam from debug.rhizome 2014-03-12 14:32:59 +10:30
Andrew Bettison
0bef066949 Store Rhizome external blob files in "blob" subdirectory
This will make issue #50 a bit easier to tackle
2014-03-07 16:55:38 +10:30
Jeremy Lakeman
fa6c563e5b Cleanup git version arguments 2014-03-05 10:26:54 -08:00
Jeremy Lakeman
0217b2b9db Don't check the database again after tranfer completes 2014-03-05 10:04:33 -08:00