summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2019-06-30refactor a bit of code: retrieve_fullname/retrieve_size, so thatMarc Espie
special files are a bit less special. Leave ::Sample for now
2019-06-30tweak short_print to commonalize stems if they all have the same versionMarc Espie
number. Adjust the other shortener for that.
2019-06-28merge unbound 1.9.2Stuart Henderson
2019-06-28update to unbound-1.9.2, florian@ agreesStuart Henderson
2019-06-28Actually, the C standard only guarantees that atexit(3) returns non-zeroIngo Schwarze
on error, so tweak previous to test "atexit(...) != 0" for portability. "OK ok ok sorry backwards" deraadt@
2019-06-28fputc/fputs return EOF on errorTheo de Raadt
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
2019-06-28The bgpctl parser can not handle neighbor and neighbors at the same time.Claudio Jeker
It will always complain that neighbor is ambiguous. Switch neighbors to peers to resolve the issue.
2019-06-28Reset rpending (read pending) indicator for a peer when the peer goes downClaudio Jeker
and the read buffer is cleared. Also make sure that the poll timeout is only reduced to 0 if rpending is set and the read buffer has data to process. This should fix a problem within the SE causing it to spin with a poll timeout of 0. OK phessler@
2018-04-27Import lpd, a re-implementation of the lpr daemon following the latestEric Faurot
OpenBSD coding practices (fork+exec/privsep/pledge/...). It is only intended to replace the lpd(8) daemon for the moment, not the lpr(1), lprm(1), lpq(1) and lpc(8) commands. This is a work in progress. The server part should be fairly functionnal, but the printer part is not complete: remote printers should work, for local printers it depends on the setup. Anyway, at this point it's better in the tree than rotting on my disk. ok deraadt@
2019-06-28switch timestamps to use timevals in filters like we do in reportingGilles Chehade
2019-06-28mkstemp() returns -1 on failureTheo de Raadt
2019-06-28atexit() returns -1 on failureTheo de Raadt
2019-06-28Implement the bits and pieces that are needed to dump MRT_DUMP_V2_RIB_GENERICClaudio Jeker
messages and BGP MPLS VPNs. OK benno@
2019-06-27Some asprintf() calls were checked < 0, rather than the precise == -1.Theo de Raadt
ok millert nicm tb, etc
2019-06-27Allow logging to both stderr and syslog; don't reset the log level ifOtto Moerbeek
the log destination changes. ok claudio@ benno@
2019-06-27Move the check wether line is NULL above further accesses of it.Matthias Kilian
ok gilles@
2019-06-27Allow filters to log information through stderr. This simplifies andMartijn van Duren
unifies the way filters need to get their logging to the right location. Log-messages are read line by line and are logged at LOG_ERR level via the lookup process. OK gilles@
2019-06-26Add support for OCSP staplingReyk Floeter
Many thanks to Bruno Flueckiger who independently sent a very similar patch. He also tested the one I'm committing that it works as expected. OK tb@
2019-06-26reject DATA containing <CR> that's not part of <CRLF> line terminatorsGilles Chehade
as they are not allowed by RFC, have never been generated by a regular MUA/MTA and can cause issues with some filters if we let them through. ok jung@ on an earlier version of the diff, eric@ suggested the new diff
2019-06-25ibuf_write() returns -1 on error.Sebastian Benoit
ok claudio@
2019-06-25cleanup return code checks for the pfkey_*() functions.Sebastian Benoit
ok claudio@
2019-06-25Initialize the peer id of peerself to PEER_ID_SELF before adding it toClaudio Jeker
peer table. Fixes an endless loop of peer_down errors on shutdown.
2019-06-25Remove irrfilter from bgpctl. The current code is not very useful.Claudio Jeker
Trying to parse RPSL has shown to be impossible. For now tools like bgpq3 (in ports) can be used to generate AS and prefix sets based on IRR data. OK job@ deraadt@ sthen@ benno@
2019-06-24rename wait queuesGilles Chehade
2019-06-24mrt dumps lost communities after the community rewrite.Claudio Jeker
Readd them by dumping them explicitly. Tested by and OK benno@
2019-06-22Add a direct pointer from struct prefix to struct pt_entry.Claudio Jeker
This changes makes it possible to not use the struct rib_entry pointer which will be used to optimize the Adj-RIB-Out. Also adjust pt_ref() and pt_unref() so that the code can be written a bit more compact. Also prefix_cmp() no longer needs to go via rib_compare() and calls pt_prefix_cmp() directly. OK phessler@
2019-06-22Adjust peer id allocation a bit. Use defines for the various specialClaudio Jeker
values and intervals. Mostly the same with the exception that peerself is now id 1 and the first peer has id 2 -- was 0 and 1 before. OK kn@, benno@
2019-06-21Try harder to have a complete /bsd.upgrade on disk.Florian Obser
Adapted from recent changes to the KARL infrastructure. OK deraadt, sthen
2019-06-20prefix_add() is only called by path_update() and path_update alreadyClaudio Jeker
knows if the prefix exists or not (by calling prefix_get()). So doing the same check again in prefix_add() is silly and actually rather expensive with lots of peers. OK phessler@
2019-06-20If x509_get_ski_aki() fails because one of the ski or aki objects areClaudio Jeker
missing, free the other object but also set the pointer back to NULL so that the caller does not do a double free(). Found with afl by jsg@
2019-06-20Those changes should not have been in last commit. Revert them for now.Claudio Jeker
2019-06-20Don't use assert to validate user input. assert() is not for that, insteadClaudio Jeker
check and error out like it is done one other parsing issues. Agreed by deraadt@ Fixes another afl "crash" found by jsg@
2019-06-20Rewrite some if () { } else if () {} chains into multiple independentClaudio Jeker
if () blocks. Improves readability in my opinion since I skip some branches to fast when reading. OK deraadt@
2019-06-20If the ASN1_BIT_STRING has a length of 0 the unused bit count must be 0.Claudio Jeker
Check this and also adjust the upper limit check to >= 8 since only the values 0 - 7 are valid. Found by jsg@ with afl. OK deraadt@
2019-06-20prefix_updateall() is only used internally, make it a static function.Claudio Jeker
2019-06-20Change nexthop_update to run the list walk over all prefixes to runClaudio Jeker
asynchronously and therefor other tasks can make progress at the same time. Additionally prefixes belonging to a RIB which does not run the the decision process are no longer linked into the nexthop list. This replaces the early return in prefix_updateall() and reduces the time spent in nexthop_update(). OK benno@
2019-06-20tweaks with help from jmc@Otto Moerbeek
2019-06-20Tell a bit about automatic mode; ok jmc@Otto Moerbeek
2019-06-20Do a quick DNS probe to decide to stay in the forground and attemptOtto Moerbeek
an (auto) settime or give up. 15s timeout is still in effect. ok florian@
2019-06-19The main process does not need to toggle the sockets from blocking toClaudio Jeker
nonblocking just for poll(). OK deraadt@
2019-06-19Close proc fd used to talk to proc_parser when spaning the rsync processClaudio Jeker
else the fd leaks into the rsync process. OK deraadt@
2019-06-19use $OpenBSD$ headersTheo de Raadt
2019-06-19repair a cluster of "< 0" error checks for libc / syscalls, whichTheo de Raadt
should be "== -1"
2019-06-19move tals to /etc, where they can be upgraded by a "sysupgrade" ifTheo de Raadt
such a circumstance ever occurs. ok job
2019-06-19indentTheo de Raadt
2019-06-19use asprintf, rather than an intermediate bufferTheo de Raadt
ok claudio
2019-06-19Instead of the strange ASN.1 encoding of IP addresses with a size in bytesClaudio Jeker
and a count of how many bits of the last byte are unused switch to a much more normal prefixlen in bits encoding for internal use. This makes the code easier to understand. Also switch to inet_ntop() for converting a struct ip_addr into a string. OK job@
2019-06-19rpki-client(1) -> rpki-client(8)job
2019-06-19Improve terminology usedjob