Jeremy Lakeman
0382e7990e
Enable a more graceful shutdown of the server in most cases
2017-09-12 15:37:52 +09:30
Jeremy Lakeman
e158a38137
Clean up a number of memory leaks, as revealed by clang's sanitiser
2017-09-11 14:09:27 +09:30
Jeremy Lakeman
cf4306cff2
Fix warnings on android ndk
2017-08-29 13:19:35 +09:30
Jeremy Lakeman
0cc0f37b52
Failures to set socket options should only be warnings
2017-06-28 10:48:48 +09:30
Jeremy Lakeman
73136461ad
Use offsetof macro for all AF_UNIX address length calculations
2017-04-26 15:52:33 +09:30
Andrew Bettison
1efe6686fc
Use config.h instead of -DHAVE_FOO=1
...
swiftc(1) requires every -D option to be prefixed with -Xcc, which
is not easy to achieve using autoconf.
Now instead of setting configuration macros like HAVE_LSEEK64 on the
command line using -D, they are defined in config.h, which is generated
by ./configure, ignored by Git, and included by all headers and source
files that use any configuration macro.
The dependency on Makefile has been replaced with a dependency on
Makefile.in and config.h, which helps avoid some redundant full
recompiles after running ./configure, because the configure script
does not overwrit config.h if its content does not change.
2016-10-19 16:27:20 +10:30
Jeremy Lakeman
b55926b081
Add configuration for idle_tick_ms so tests can complete faster without wasting power
2016-05-10 11:19:49 +09:30
Jeremy Lakeman
c78ee668d5
Add interface index to UP/DOWN monitor message
2016-04-27 13:16:00 +09:30
Jeremy Lakeman
884a6211eb
Remove overlay_interface_find_name
2016-04-27 13:10:31 +09:30
Jeremy Lakeman
c04d015bc6
Don't continuously toggle fd blocking mode
2016-03-30 16:25:43 +10:30
Jeremy Lakeman
cf8932d5ba
Use trigger for interface up/down
2016-03-08 10:16:20 +10:30
Jeremy Lakeman
b8f10fd40d
Delay interface re-detection after errors to rate limit continuous failures
2016-02-10 10:23:27 +10:30
Jeremy Lakeman
389f16d2bb
Establish a unicast link to a configured host on demand
2016-01-27 16:27:47 +10:30
Jeremy Lakeman
d0da910b19
Avoid undefined behaviour as highlighted by clang
2016-01-27 16:27:47 +10:30
Andrew Bettison
c3375d0501
Fix MDP client packet receive bug on OSX
...
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.
2016-01-19 04:05:46 +10:30
Jeremy Lakeman
88020a840d
Add size cast to avoid compilation warning for some linux compilers
2016-01-11 14:52:29 +10:30
Jeremy Lakeman
912806360c
Tweak netlink setup code in an attempt to prevent gcc mis-optimization
2016-01-11 14:40:23 +10:30
Jeremy Lakeman
fd38ddb892
Attempt to recover from transient network errors
2015-11-23 09:48:51 +10:30
Jeremy Lakeman
a075a8edbc
Retry socket binding when interfaces come up
2015-11-16 12:54:59 +10:30
Andrew Bettison
a060642fdb
Add strbuf_local_buf() macro
2015-11-02 10:11:41 +10:30
Andrew Bettison
3ab7e04497
Add buf_strncpy_nul(), use in place of strlcpy()
2015-11-02 10:11:41 +10:30
Jeremy Lakeman
0c275e67ef
Clean up compilation warnings
2015-10-19 13:45:57 +10:30
Jeremy Lakeman
3049252c8a
Poll netlink socket for interface changes on linux systems
2015-10-12 18:11:44 +10:30
Jeremy Lakeman
79e8a94792
Add route_link.h
2015-09-28 11:58:48 +09:30
Andrew Bettison
7d9a5faa4e
Move if(config.debug.xxx) tests into DEBUGF()
...
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)
2015-07-13 16:00:05 +09:30
Jeremy Lakeman
fea91f3f82
Use configured reachable timeout for network links, read dummy files even when not ticking
2015-03-30 17:38:40 +10:30
Jeremy Lakeman
b048e8874f
Reschedule alarm when tick_ms config changed
2015-03-23 13:35:22 +10:30
Jeremy Lakeman
f7dbe06836
Rearrange interface config to support unicast settings
2015-03-23 13:35:22 +10:30
Jeremy Lakeman
a9b9f51a9f
Add support for mdp clients to provide a link layer packet transport
2015-03-02 15:44:34 +10:30
Andrew Bettison
7248d660e3
Fix non-deterministic assertion failure under load
2014-11-12 23:09:00 +10:30
gardners
6dca9fe6bf
ensure netmask is set when initialising an interface.
2014-10-31 15:01:22 +10:30
gardners
6536953703
add debug output to diagnose interface selection based on
...
received address of packet.
2014-10-31 12:26:58 +10:30
Jeremy Lakeman
a37db8e958
Move most console commands to other files
2014-08-25 16:03:30 +09:30
Jeremy Lakeman
537a09812c
Ignore some types of sendto errors
2014-06-27 12:45:53 +09:30
Jeremy Lakeman
f4e6841ed7
Ensure directory service tests aren't creating a global routing table
2014-06-16 17:22:46 +09:30
Jeremy Lakeman
dabd482ad8
Only send broadcast ticks every 5 seconds when we have no neighbours
2014-06-13 15:34:47 +09:30
Jeremy Lakeman
628a52ca87
Add monitor message for interface up/down events
2014-06-13 13:34:10 +09:30
Jeremy Lakeman
e5e848e838
Ensure interface and routing alarms stop when network interfaces are all down
2014-06-12 16:04:15 +09:30
Jeremy Lakeman
f93fba11af
Stop polling interfaces if no phsical interfaces are enabled
2014-06-04 17:13:08 +09:30
Jeremy Lakeman
b6de3fcd34
Only send rhizome sync packets when we have neighbours
2014-05-30 15:03:22 +09:30
Jeremy Lakeman
7420f46653
Create new AF_UNIX based network simulator
2014-05-23 10:47:22 +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
Andrew Bettison
1f49ee47ae
Add missing copyright messages
2014-04-07 14:39:21 +09: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
Jeremy Lakeman
2e4835d7d6
Ensure tests with packet filtering are using the dummy network interface
2014-03-12 14:32:59 +10:30
Jeremy Lakeman
7081e7044f
Ensure AF_UNIX DGRAM sockets don't block during tests
2014-03-03 14:06:31 -08:00
Jeremy Lakeman
880117f6db
Reduce peak bandwidth usage (though we really need a dynamic limit)
2014-03-01 05:28:54 +10:30
Jeremy Lakeman
b8971e51f4
Refactor socket helper functions to take socket_address struct
2014-02-20 14:44:38 +10:30
Jeremy Lakeman
04955f1ddd
Fix interface name comparison for detecting real interfaces
2014-01-20 16:01:29 +10:30
Jeremy Lakeman
4bb3336b33
Generalise method for defining multiple interfaces
2014-01-09 15:01:38 +10:30