Commits
- Commit:
6b5c4000434cc5dc67e202d8aede2f543b5b2bf3- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
Standardize logging with bgpd
OK claudio@
- Commit:
e475725efdaacc720c9b0f5c3ba9cf6300c5d73b- From:
- deraadt <deraadt@openbsd.org>
- Date:
When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
- Commit:
3d2b313875b7f2a1206086c7d07e409da937d32d- From:
- jca <jca@openbsd.org>
- Date:
Consistently use the variable "ttl" for get/setsockopt
ok benno@ on an earlier version, input from Kapetanakis Giannis
- Commit:
85a9c342942e758d1bcd97e94f978506742147fa- From:
- florian <florian@openbsd.org>
- Date:
Correctly set ttl for IPv4 and IPv6.
Problem noted and fix from Kapetanakis Giannis, thanks!
Input & OK jca.
- Commit:
09e53feeaa2a7c28a81c8bac20bab18c68d83883- From:
- benno <benno@openbsd.org>
- Date:
use __func__ in log messages. fix some whitespace while here.
From Hiltjo Posthuma hiltjo -AT codemadness -DOT- org, thanks!
ok florian, claudio
- Commit:
58fc320c602b00aed04b7887496e83d9892bed86- From:
- reyk <reyk@openbsd.org>
- Date:
Split "struct relayd" into two structs: "struct relayd" and "struct
relayd_config". This way we can send all the relevant global
configuration to the children, not just the flags and the opts.
With input from and
OK claudio@ benno@
- Commit:
24dcf092825c2f258ae81a032dfe529978e6dd09- From:
- reyk <reyk@openbsd.org>
- Date:
Use SOCK_NONBLOCK in relayd as well.
OK benno@
- Commit:
073d0cf182b1a21d83026e674250dafbc5908426- From:
- benno <benno@openbsd.org>
- Date:
let the icmp check use getsockopt IP_IPDEFTTL to get the default ttl
instead of using sysctl. makes it possible to pledge hce.
- Commit:
779fb716f42306f7d74105ac3d0ecdee0db55916- From:
- yasuoka <yasuoka@openbsd.org>
- Date:
Increase the input side socket buffer size for "check icmp" not to
drop the reply messages when "check icmp" is used with many hosts.
ok reyk benno
- Commit:
d93c36af2b8111f07ff7645770d4714a2e5aef96- From:
- reyk <reyk@openbsd.org>
- Date:
Clean up the relayd headers with help of include-what-you-use and some
manual review. Based on common practice, relayd.h now includes the
necessary headers for itself.
OK benno@
- Commit:
2f6ec04dcc8d2ec0050455263b94308f36252825- From:
- deraadt <deraadt@openbsd.org>
- Date:
Adapt to <limits.h> universe.
ok millert
- Commit:
270ed42a50acc8797df2df92305e394b39ded472- From:
- guenther <guenther@openbsd.org>
- Date:
Stop pulling in <arpa/inet.h> or <arpa/nameser.h> when unnecessary.
*Do* pull it in when in_{port,addr}_h is needed and <netinet/in.h> isn't.
ok reyk@
- Commit:
5a30f51bc00ea660a335280def096dbd5ff3e0bf- From:
- lteo <lteo@openbsd.org>
- Date:
Remove unnecessary netinet/in_systm.h include.
ok millert@
- Commit:
b7f7a948d01b98e0853f7d0c2efb6591025f657f- From:
- reyk <reyk@openbsd.org>
- Date:
This diff changes relayd to use the monotonic clock instead of
gettimeofday(). It was also bugging me for some time to have all
these checks of gettimeofday()'s return value: it should not fail. So
this diff introduces a void getmonotime(struct timeval *tv) that calls
clock_gettime(CLOCK_MONOTONIC, &ts) and converts the output to a
struct timeval that can be used with the existing code and the
timeval-specific timer functions (timerclear, timersub, ...). It does
not return a status but calls fatal() on error-that-should-not-happen.
ok sthen@ chris@
- Commit:
01a637df6e113c98d4a93a78e007a591740488fe- From:
- sthen <sthen@openbsd.org>
- Date:
use correct function name in fatal error message
- Commit:
6e65a975b436584ac07f2b29bace416e56d5ac61- From:
- bluhm <bluhm@openbsd.org>
- Date:
Remove unnecessary pointer casts. No binary diff.
OK benno@
- Commit:
5c4f74ea23ee8df76171198181d8f16af86044fa- From:
- reyk <reyk@openbsd.org>
- Date:
Copy the host id value to the ICMP echo payload in network byte order and
in a nicer way that silences the compiler.
ok benno@
- Commit:
0c7b5676154c870cf2ffe821dde4d37e7c1ba60b- From:
- reyk <reyk@openbsd.org>
- Date:
Fix ICMP checks by setting the socklen correctly before calling recvfrom().
ok benno@
- Commit:
dbef7d4f82e95c334a131206f7d2ac02d3ef21bd- From:
- reyk <reyk@openbsd.org>
- Date:
Reorganize the relayd code to use the proc.c privsep API/commodity
functions that are based on work for iked and smtpd. This simplifies
the setup of privsep processes and moves some redundant and repeated
code to a single place - which is always good from a quality and
security point of view. The relayd version of proc.c is different to
the current version in iked because it uses 1:N communications between
processes, eg. a single parent process is talking to many forked relay
children while iked only needs 1:1 communications.
ok sthen@ pyr@
- Commit:
666bd316da38eef77379216e92680abfa93b938a- From:
- reyk <reyk@openbsd.org>
- Date:
Update all logging and debug functions to use the __func__ macro
instead of static function names. __func__ is C99 and perfectly fine
to use. It also avoids printing errors; for example if a statement
log_debug("foo:"..) was moved or copied from function foo() to bar()
and the log message was not updated...
- Commit:
4bd84ef0ec16d8ee2046d14bd944632e1506f914- From:
- reyk <reyk@openbsd.org>
- Date:
do not timeout disabled hosts in the icmp checks
Thanks to Sebastian Benoit, closes pr6146
- Commit:
446e8f122a7c7695ae31c82983c6de79ff0aeb70- From:
- reyk <reyk@openbsd.org>
- Date:
get the default ttl via sysctl instead of using IPDEFTTL
- Commit:
c3895d832ff36ac672a0723addc98b537dbbe786- From:
- reyk <reyk@openbsd.org>
- Date:
allow to modify the IP TTL value for host checks. this can be used to
check if the host is only n hops away and not re-routed over a longer
path.
- Commit:
b2665266d92bceb7dc70464de456400de7179d27- From:
- reyk <reyk@openbsd.org>
- Date:
change the way relayd reports check results: instead of logging an
arbitrary string in debugging mode, it will store an error code
(HCE_*) for each host. the error code can be translated to a string
(in log.c) for debugging but it will also be passed to relayctl via
the control socket.
from a user point of view, this will print a human-readable error
message in the "relayctl show hosts" output if a host is down because
the check failed. the relayctl(8) manpage includes detailed
explanations of the error messages including mitigations for the
most-common problems.
ok jmc@ (manpages)
ok phessler@
- Commit:
20eb21316f0c5eb7ff26071705005943f6cae9e9- From:
- thib <thib@openbsd.org>
- Date:
Check gettimeofday() against -1; Add a missing error check in one place.
OK reyk@
