Commits
- Commit:
6b5c4000434cc5dc67e202d8aede2f543b5b2bf3- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
Standardize logging with bgpd
OK claudio@
- Commit:
42a9e5ca0bed75250b46cef39a1b574b37c787a7- From:
- sashan <sashan@openbsd.org>
- Date:
The fix comes from Giannis Kapetanakis (bilias _from_ edu.physics.uoc.gr).
When relayd(8) handles 'host disable/enable' command issued by relayctl(8),
it disables redirect it finds in tables for particular host. However there can
be multiple redirect instances which use the same host in relayd(8) tables.
This change makes relayd(8) to walk through all tables and disable all redirects
which match the host.
OK giovanni@, OK sashan@
- Commit:
04a2f9536b27f11bd789df2ae153cc14c073ce4b- From:
- martijn <martijn@openbsd.org>
- Date:
Rewrite the agentx code of relayd. This new framework should allow us
to add new objects easier if so desired and should handle a lot more
corner-cases.
This commit should also fix the following:
- On most (all) tables it omits the *Entry elements, making it not map to
OPENBSD-RELAYD-MIB.txt.
- sstolen returns the size of the sockaddr_in{,6}, instead of the
sin{,6}_addr resulting in garbage data to be put in the ip-field.
- relaydSessionPortIn and relaydSessionPortOut are swapped
- relaydSessions only uses relaydSessionIndex, while
OPENBSD-RELAYD-MIB.txt says it should have 2 indices
- miscellaneous minor things related to the AGENTX-protocol, like wonky
index handeling and returning NOSUCHINSTANCE where NOSUCHOBJECT
should be returned, etc.
This commit does remove traps, but it's large enough as is and I intent
on adding it soon(tm). It also deprecates the snmp keyword in favour of
an agentx keyword. The snmp keyword is still available, but will be
removed in the future.
Tweaks and OK denis@ on the relayd parts
Tweaks and OK claudio@ on the agentx parts
"Get it in" deraadt@
- 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:
731620555b5a9e9df17d53d8018195d73f868dd7- From:
- benno <benno@openbsd.org>
- Date:
move the opening of /dev/pf from the parent process to the pfe process
where it is used.
Currently pf is opened on every reload, that will no longer be
possible in the future with pledged programms that do ioctls.
This prepares relayd for that change.
ok deraadt@, meinetwegen reyk@
- Commit:
972a10c5cda30d2c454cada49ed016cd757b85ef- From:
- reyk <reyk@openbsd.org>
- Date:
Move snmp options into struct relayd_config and delay start of the
snmp subsystem until the configuration is done.
OK benno@ 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:
3b28f64e7ce90c385f9cba796eea7679429013e3- From:
- reyk <reyk@openbsd.org>
- Date:
As done in httpd, remove ps_ninstances and p_instance.
OK benno@ rzalamena@
- Commit:
94404df807e123f4adb593433ee6e68bbf0378d0- From:
- reyk <reyk@openbsd.org>
- Date:
Terminate relayd using the socket status instead of watching SIGCHLD
or killing child processes. - Based on rzalamena@'s diff for httpd.
OK deraadt@ rzalamena@
- Commit:
0cf1873ef3060e73bea2167d5cec54cc646747f3- From:
- benno <benno@openbsd.org>
- Date:
quick removal of all host-related entries in the related relayd anchor
if the host fails the SLA check. patch from Brian S. Vangsgaard.
ok reyk@
- Commit:
141b9058ce43c28db842829304e8909a29d231bb- From:
- reyk <reyk@openbsd.org>
- Date:
In most cases we don't need all arguments of proc_compose*_imsg(),
so add a shortcut proc_compose*() that skips all of them. Only use the
full argument list if needed. The functions with full argument lists can
eventually be replaced with a nicer transaction-based approach later.
OK benno@
- Commit:
3a342b20f6170a49ef823429c0897bd118135716- From:
- benno <benno@openbsd.org>
- Date:
Use pledge("pf") in pfe.c.
Move getrtable() from pfe to parent process, since its in the way of
pledge.
ok deraadt@, feedback from reyk@ on previous version.
- Commit:
220afe36af30929655956c372145e4f6e8b5a9e0- From:
- jsg <jsg@openbsd.org>
- Date:
fix a memory leak. ok blambert@
- Commit:
02c2c4e484a745287f9b784fb61c1f0f70c9a073- From:
- blambert <blambert@openbsd.org>
- Date:
move a log_warnx() to a DPRINTF, as it's information intended
for developers, not sysadmins
original diff from yasuoka@
- 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:
28bd28ce02f4f0d97454036901f09cbedc246eeb- From:
- blambert <blambert@openbsd.org>
- Date:
Support exporting relayd statistics via AgentX/snmpd
This should be equivalent to the statistics available
via the various relaydctl show commands
okay benno@ reyk@
- Commit:
69fde657f218939a972c0abb9eddfc5625c968b8- From:
- reyk <reyk@openbsd.org>
- Date:
Replace the protocol directives for HTTP with a new generic filtering
language. The grammar is inspired by pf and allows to write versatile
last-matching filter rules in protocol sections starting with the
"pass", "block" or "match" keywords. This work was started almost two
years ago and replaces large parts of relayd(8)'s HTTP and filtering
code. The initial version reimplements and extends HTTP filtering,
but will be improved to support generic TCP and other protocols later.
With some testing, feedback, and help from benno@ and andre@.
OK benno@
- 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:
0f7a5e2ea66bb7cd5d694f017227b543be3f37f9- From:
- reyk <reyk@openbsd.org>
- Date:
Support more than one relay backup table. Instead of duplicating the
code for main and backup table all over the place, turn the relay
tables into a list attached to the relay. This improves the code and
allows some other tricks with multiple tables later.
- Commit:
996c1f224a132a600773a1c96384d532af17d5b5- From:
- camield <camield@openbsd.org>
- Date:
Only start the child processes after all of them reported to have loaded
the config. Solves a race at startup time where processes can send status
messages about hosts that other processes don't know about yet.
(and have relayd abort with "desynchronized" or "invalid host id")
ok henning pyr deraadt
solves the problem ok from benno todd
- Commit:
af90452584bdbc339a3228632a6208fdf821aa96- From:
- camield <camield@openbsd.org>
- Date:
fix function names in fatalx() messages
ok mikeb
- Commit:
f55b094157b1c4c27e7b58272fcc01f760f77356- From:
- reyk <reyk@openbsd.org>
- Date:
Concurrent calls of "relayctl show sessions" could crash relayd. Fix
the show sessions handler by implementing it in an asynchronous way.
Closes PR 6509
ok pyr@
- Commit:
591e6ab59d9901a8a5a1eec8f4593ffc39656829- From:
- reyk <reyk@openbsd.org>
- Date:
Fix reload support in relayd(8) by reimplementing large parts of the
daemon infrastructure. The previous design made it fairly hard to
reload the complex data structures, especially relays and protocols.
One of the reasons was that the privsep'd relayd processes had two
ways of getting their configuration: 1) from memory after forking from
the parent process and 2) and (partially) via imsgs after reload. The
new implementation first forks the privsep'd children before the
parents loads the configuration and sends it via imsgs to them; so it
is only like 2) before. It is based on an approach that I first
implemented for iked(8) and I also fixed many bugs in the code.
Thanks to many testers including dlg@ sthen@ phessler@
ok pyr@ dlg@ sthen@
- 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@
