summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2021-04-15Call rrdp_data_handler() for any kind of poll event that has happened.Claudio Jeker
On OpenBSD closing a connection will result in a read even (POLLIN) while on Linux POLLHUP is returned. rrdp_data_handler()'s read() call returns in both cases 0 and finishes the XML parsing. Found and fix tested by job@, OK deraadt@
2021-04-15Do not only check the serial number but also the session_id beforeClaudio Jeker
adding a delta to the queue. If the session_id differs there is no need for deltas since a snapshot must be fetched. OK job@ benno@ deraadt@
2021-04-14On powerpc64 tcpdump(8) could not parse wireguard packets.Alexander Bluhm
EXTRACT_LE_32BITS() converts the type from little endian to host endian. So we need the constants in host endianess. This fixes regress/sys/net/wg. OK deraadt@ sthen@
2021-04-14move the RPKI_VERSION define into its own version.h file, helps portable.Sebastian Benoit
ok claudio@
2021-04-13Adjust http_done() the be more like http_fail() -- only do the messageClaudio Jeker
delivery part but don't alter the http_connection anymore. Also move common code in the connect case into a new function and call it from connect and finish connect. OK benno@
2021-04-13Before adding a file to the temporary rrdp repo remove it from theClaudio Jeker
deleted filepath set. A file can only be in one set (deleted or added) but not on both. OK benno@
2021-04-12Cast XML_GetCurrentLineNumber() to unsigned long long in warnx sinceClaudio Jeker
expat my either use unsigned long or unsigened long long as return value depending on compile options. This upcast is an easy way around this issue. OK deraadt@
2021-04-12Spaces, no functional changeClaudio Jeker
2021-04-11KNF, capitalization, whitespacedv
2021-04-11Remove dead code for unused IMSG_CTL_NOTIFY messages.dv
Some vestigial code left over from when priv-sep was implemented. ok mlarkin@
2021-04-11Correct a comment: reference the correct filedv
2021-04-11do not build unused code and remove uneeded dependency on libm.Eric Faurot
ok tb@
2021-04-11Fix two typos in commentsjob
sure deraadt@
2021-04-10remove dead code and unused dependenciesEric Faurot
ok tb@
2021-04-10Do not compare TLS config params for non-TLS servers. This allows toClaudio Jeker
mix 'listen * port 80' and 'listen * tls port 443' in one server block. Also the last argument of server_tls_cmp - match_keypair - is always 0 so remove this code. OK florian@ tb@ some long time ago
2021-04-10bump smtpd versionEric Faurot
2021-04-09allow to specify tls ciphers and protocols on listenersEric Faurot
ok tb@
2021-04-09Tidy up the http state machine a bit. Make sure that http_nextstate() runsClaudio Jeker
until an error or an IO opperation is needed. In other words it should not return 0. Because of this adjust the http_tls_connect() call a bit. Also call http_connect() in http_redirect() instead of needing an extra step in the state machine. Last but not least make sure that http_handle() does only one IO operation and check for possible POLLHUP event. OK tb@
2021-04-08Expose two extra metrics via JSONjob
This removes some of the needs of rpki-client affiniadios who screen-scrape rpki-client's STDOUT. OK deraadt@
2021-04-08Increase buffer size for http_info a bit. 64 chars is a bit short forClaudio Jeker
RRDP URLs.
2021-04-08Refactor the regular and chunked data write so that one function canClaudio Jeker
handle both cases. Simplifies the code a fair bit. OK tb@
2021-04-08Switch logic from != to ==. Makes the code easier to read.Claudio Jeker
2021-04-08Change the order of the poll loop to first process active http connectionsClaudio Jeker
and then accept new ones. This way there is no risk of processing a new connection before poll() was called. OK tb@ as part of a larger diff
2021-04-08Shuffle deck chairs so that the order is more logical (at least for me).Claudio Jeker
No functional change.
2021-04-08Prevent a use-after-free access in case of a http redirect by also clearingClaudio Jeker
the conn->res pointer after calling freeaddrinfo(). OK tb@ (as part of a bigger diff)
2021-04-08More cleanup of the main function. Use a loop to collect all childs withClaudio Jeker
waitpid() and print if they exited non-zero or by a signal. Also adjust the poll hangup case to exit the poll loop instead of erroring out. This way a crashed child should be reported before exit. OK job@ tb@
2021-04-08Missing setproctitle("rrdp") noticed by deraadt@Claudio Jeker
2021-04-08reword manpage on -njob
OK claudio@
2021-04-08The path with the *highest* local weight is selectedDaniel Jakots
ok kn
2021-04-07In some cases the http process terminates and Theo's and my theory is thatClaudio Jeker
this is caused by a SIGPIPE. So add a handler that will abort the process and dump core. OK deraadt@
2021-04-07Free the parser then close the file. Seems like the better order.Claudio Jeker
2021-04-07minor KNF found while hunting for a bugTheo de Raadt
2021-04-07Handle bind() failure like connect() or socket() failure and try nextClaudio Jeker
address if available. No other tools consider bind() errors as non-fatal warnings so rpki-client should not behave different. OK tb@
2021-04-07When merging a repo even files to delete can be part of the temporaryClaudio Jeker
work dir. So unlink can return an ENOENT error for the main repo. In which case the temp dir should be tried. Refactor this code a bit since there is no way rrdp_filename() should fail in this part of the code. OK tb@
2021-04-06handle_client() doesn't need to return a valueJeremie Courreges-Anglas
Its caller doesn't use the return value so zap it. Also zap tentative error handling in the caller. ok kn@
2021-04-06Missing indentation, ok kn@Jeremie Courreges-Anglas
2021-04-06Bump APMD_VNO, for the size of struct apm_reply has changedJeremie Courreges-Anglas
ok kn@
2021-04-06Make apm(8) report apmd(8) failurekn
apm(8) never got the result of the requested power action carried out by apmd(8), so apm(4) errors got silently discarded; for example, zzz(8) would merely print "Suspending system..." and exit zero on platforms lacking suspend/resume support. Enrich reply messages from apmd to apm with an error field containing the failed ioctl(2)'s errno if need be. Hoist apmd's power action dispatch into handle_client() so it can write the error in the first place before replying. OK dv
2021-04-06convert UTF-8 to plain ascii, spotted by florianStuart Henderson
2021-04-06merge NSD 4.3.6Stuart Henderson
2021-04-06merge NSD 4.3.6Stuart Henderson
2021-04-06Do not return when a hash check failed in rrdp_data_handler() insteadClaudio Jeker
let the code progress to set the state to RRDP_STATE_PARSE_DONE and call rrdp_finished() since this transfer is over. Should fix a hang seen by deraadt@ OK tb@
2021-04-06uppercase "HTTP";Jason McIntyre
2021-04-06Mention the http client in two places.Theo Buehler
ok claudio
2021-04-06Cleanup http_connect() and make it look more like the example inClaudio Jeker
getaddrinfo(3). Most notable change is the error reporting. Do not warn if cause is not set. In this case the last connect attempt failed but there is no alternate address to use. Since that error was already logged there is no need for an extra warning here. OK job@
2021-04-06Move the http_fail() call out of http_free(). Doing the error reportingClaudio Jeker
there is not quite right. OK job@
2021-04-06Kill unused globals and swap the POLLIN and POLLOUT handler for theClaudio Jeker
pipe to the main process. OK job@
2021-04-06use "braces" consistenly; fastcgi can take multiple options;Jason McIntyre
original issue and text from laurence tratt, with updates from raf czlonka
2021-04-05Support booting from compressed kernel images.dv
The bsd.rd ramdisk now ships gzip'd on amd64. Use libz in base to transparently handle decompression of any compressed kernel images. Patch from Josh Rickmar. ok kn@
2021-04-05Until tls_accept_socket() succeeds, the tls context bound to a sessionEric Faurot
belongs to the listener, and should not be freed with that session if an error occurs before. Unlink it from the session early in the accept callback to avoid this. tweaks and ok millert@