Commit Graph

3338 Commits

Author SHA1 Message Date
Jeremy Lakeman
9ed507f740 Move rate limit code to separate file 2014-05-12 13:44:50 +09:30
Jeremy Lakeman
5b6ae35a73 Only use the best rtt calculation once per ack 2014-05-12 13:44:50 +09:30
Jeremy Lakeman
55db779f8c Remember specified rate limit 2014-05-12 13:44:50 +09:30
Jeremy Lakeman
eb08cf27ce Move msp retransmit time to #define'd const 2014-05-12 13:44:50 +09:30
Jeremy Lakeman
7bd34b7d9b Don't rebuild version.o if nothing has changed 2014-05-12 13:44:50 +09:30
Jeremy Lakeman
4a2b54de1b Warn if Makefile is out of date 2014-05-12 13:44:50 +09:30
Jeremy Lakeman
796eb6268c Fix list traversal and element freeing 2014-05-09 15:13:14 +09:30
Jeremy Lakeman
bb39bb871a Only unwatch if we were watching 2014-05-09 15:13:13 +09:30
Jeremy Lakeman
2a07093c5f Don't compare past the end of the parent key 2014-05-09 15:13:13 +09:30
Jeremy Lakeman
672104bdd8 Create extensible service discovery protocol, with initial basic implementation 2014-05-09 11:21:18 +09:30
Jeremy Lakeman
4204973052 Allow for more duplicates in 2hop test 2014-05-09 11:21:16 +09:30
Andrew Bettison
2c0efc6334 Set up SEGV crash handler in main() not server()
Now all commands will attempt to log a GDB backtrace on a crash, not
just the server daemon process.

Added strbuf_append_signal_name()
2014-05-08 14:24:00 +09:30
Jeremy Lakeman
7a3095de09 Detect abbreviation collisions with multiple identities 2014-05-07 17:03:43 +09:30
Andrew Bettison
7a2f1536bc Improve mdp_recv() error handling
Make all V2 MDP interface calls take a __whence argument

mdp_recv() always sets error before returning -1, does not set
errno=0 otherwise

mdp_recv() does not log errors on EINTR or EAGAIN (EWOULDBLOCK)

mdp_recv() sets errno=EOVERFLOW if local socket name is too long

mdp_recv() sets errno=EBADMSG if malformed or spurious packet
received

Remove redundant mdp_recv() error logging from "mdp ping" and
"config sync" and several "id" commands
2014-05-05 18:23:38 +09:30
Andrew Bettison
cd9f35f1c8 Improve "log.h", make logMessage() inline
Make logMessage() -- wrapper around vlogMessage() -- an inline
function and remove redundant conditional level != LOG_LEVEL_SILENT

Move logString() into log_util.c, refactor so outer loop now iterates
over lines in buffer, rather than over all log outputs

Rename log_backtrace() to logBacktrace() for consistency

Document __NOWHENCE__ value
2014-05-05 18:17:51 +09:30
Andrew Bettison
18c89b4b98 Fix bug in read_symlink(), improve logging 2014-05-05 18:12:25 +09:30
Andrew Bettison
f606daebc6 Move get_self_executable_path() into "os.h"/os.c 2014-05-05 18:12:01 +09:30
Andrew Bettison
df1814309b Improve MDP filter rules file syntax 2014-05-05 14:45:33 +09:30
Jeremy Lakeman
8ddd256b5c Add more asserts for ping stats, with some slack 2014-05-05 14:35:31 +09:30
Jeremy Lakeman
ab915a13fc Use routing table to check if a node is unreachable 2014-05-05 13:22:36 +09:30
Jeremy Lakeman
8ae76f7157 Track most recent ack from neighbours, prevent duplicate broadcast packets 2014-05-05 11:53:57 +09:30
Andrew Bettison
60201d78c9 Fix Android compile failure: st_mtim, UTIME_OMIT
Use utimes(2) instead of utimensat(2), use struct timeval instead of
struct timespec

Add strbuf helper functions for struct timeval and time_ms_t
2014-05-02 15:47:51 +09:30
Jeremy Lakeman
8e7d13fd27 Treat all compile warnings as errors 2014-05-02 15:44:39 +09:30
Jeremy Lakeman
ec9bc428d4 Move console reading from vomp_console.c to console.c 2014-05-02 14:03:23 +09:30
Jeremy Lakeman
6a330977f3 Refactor and move logArgv() to log_util.c 2014-05-02 13:45:31 +09:30
Andrew Bettison
fd8195fa4f Improve test framework: execute --error-on-fail 2014-05-02 13:45:31 +09:30
Andrew Bettison
206aa936c0 Refactor 'vomp' test fifo handling
Use new execute --stdout-file=PATH test framework feature
Remove unnecessary shell variable indirection
2014-04-30 17:21:58 +09:30
Andrew Bettison
24ed57c19b Improve test framework: execute --stdout-file=PATH
Also execute --stderr-file=PATH
2014-04-30 17:12:25 +09:30
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