summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2021-05-19When we disable "Transfer-Encoding: chunked" in the fastcgi backendFlorian Obser
because we are going to send an empty body we have to provide "Content-Length: 0" otherwise some browsers (Firefox, Safari) just hang until httpd(8) closes the connection. Problem reported by Matthias Pressfreund, debugged with weerd@ who pointed out that the problem is browser dependent. OK tracey
2021-05-18bump rpki-client versionSebastian Benoit
2021-05-18vmd(8): guest virtio drivers can cause stack & buffer overflowsdv
A vmd guest can craft invalid virtio descriptor lengths resulting in reading and writing beyond stack-allocated buffer lengths providing an escape vector to the host. Instead of allowing the guest to dictate read/write lengths, this commit has vmd just use compile-time lengths based on the source or destination object sizes. For instances where vmd's virtio implementation can't use this method, such as reading packets from the vionet device, cap each read with a pre-computed max chunk size. Reported by Maxime Villard. Tested with help from Mischa Peters, OK mlarkin@
2021-05-17Limit the number of concurrent RTR connects to 32.Claudio Jeker
If the limit is hit the request will be dropped and the rtr process will retry the connect after the retry timeout. Hopefully by then the number of connections is down again. OK deraadt@ benno@
2021-05-17Do not try to chunk encode an empty http body coming from an fcgiFlorian Obser
upstream. Found the hard way by Chris Narkiewicz who tracked failing uploads in the nextcloud mobile app down to httpd(8) trying to chunk encode a "204 No Content" resonse. Testing by Steve Williams Testing & OK stsp
2021-05-16Capabilities are only supported on a session when both sides announceClaudio Jeker
that capability. Change capa_neg_calc() to check always both the ann(ounce) and peer capa struct to figure out what was negotiated. This change affects route refersh and graceful restart (where before setting the capability in the config to 'no' would not fully disable the feature). Also ignore and warn about unexpected route refresh messages. OK benno@
2021-05-15Remove outdated comment. We got all httpd headers from the fcgi serverFlorian Obser
at this point.
2021-05-13RFC 4861 4.1 allows router solicitations from the unspecified addressFlorian Obser
(::). A short survey suggests that some systems respond with a multicast router advertisement and other don't. Andrew Forgue pointed out a usecase for this, booting a UEFI system over http in an IPv6 network only. ("IPv6 support for UEFI IPv6 booting" on bugs@ a long time ago) There is also no downside in allowing this, any host on the layer 2 network can solicit a router advertisement. OK phessler
2021-05-13acme-client: use EC_POINT_{get,set}_affine_cooordinates()Theo Buehler
The versions with _GFp() suffix only exist for historical reasons. Now that we have EC_POINT_{get,set}_affine_coordinates(), we should stop using the old ones as they provide no benefit. ok florian
2021-05-12vmctl(8): remove unveil from disk image creation routinesdv
James Cook reported an issue creating images from qcow2 disks that contained base images. Initial approach suggested was to replace the use of realpath(3), but since this is common code used in vmd(8) the better option is to just remove the use of unveil(1) in vmctl. (It was added very early in vmctl's development before support for disk conversion was added.) This does not change existing unveil usage in vmctl for things like the control socket or the serial console. There's no change to vmd either. Discussed with and OK from mlarkin@
2021-05-12vmd(8): omit a possibly uninitialized var in a log_warnxMike Larkin
Don't print 'base' since it might not be initialized in all code paths. From James Cook
2021-05-11Don't leak fd on error.Claudio Jeker
2021-05-11Make sure some variables are initialised since modern gcc warns about them.Claudio Jeker
Handle rrdppid like we do for all other child processes. The two warnings in rrdp are probably false positives. OK tb@
2021-05-11Arm the alarms in all childs so they terminate if the timeout is hit.Claudio Jeker
Also install the special signal handler around the main poll() loop. The main process handles SIGALRM so it can log an error to the operator before exiting. With and OK deraadt@
2021-05-11Before calling ASN1_time_parse() initialize the struct tm. WhileClaudio Jeker
recent libressl version initalise the struct tm properly older versions did not and so -portable runs into problem on systems with older libressl versions installed. Problem found by job@ OK tb@
2021-05-11Use non-blocking connect() to setup the RTR socket. connect() can hang forClaudio Jeker
a long time if the IP is not reachable and would block the main process while doing so. Problem noticed by Pier Carlo Chiodi OK benno@
2021-05-10To add keep-alive support the read handler got changed a lot. Now whenClaudio Jeker
tls_read hits the EOF (s == 0) case it is always a cause to close the connection. All possible data was already consumed and if something is still in the buffer then it remained in there for a reason. Issue noticed and OK deraadt@
2021-05-09Garbage collect sz in mft_parse_filehash() which has been unusedTheo Buehler
since mft.c r1.20.
2021-05-09two whitespace tweaksTheo Buehler
2021-05-09Remove unnecessary NULL check that breaks the build with OpenSSL 1.1.Theo Buehler
ok job
2021-05-06Bring comment in sync with the code. No functional change.Claudio Jeker
2021-05-06Add an 'expires' column to CSV & JSON outputjob
The 'expires' value contains a reasonable earliest moment a VRP would expire, in light of the currently available set of CAs and CRLs. The 'expires' value can be used to avoid route selection based on stale data when generating VRP sets, when faced with loss of communication between consumer and valdiator, or validator and CA repository. OK claudio@
2021-05-06export [ none | default-route ] changes are not handled by reload.Claudio Jeker
2021-05-06It is no longer required to reset a session when export is changed.Claudio Jeker
2021-05-06Improve reload behaviour of RDE peer flags and export_type.Claudio Jeker
Add an extra reload barrier (IMSG_RECONF_DRAIN) to the sync of the peer config from the session engine to the rde. Necessary to ensure that the peer config is up to date in the RDE before hitting reconfiguration. Store the export_type and the peer flags outside of peer->conf. Adjust all users of these two fields so they only look at the copies in peer. During reload check the values with the peer->conf to check for changes. If the export_type or the rde evaluate or transparent-as flags changed flush the Adj-RIB-Out for that peer and in a 2nd step rebuild the RIB from scratch. This results in a lot of UPDATE churn but these configs are not altered often. Fix multiple issues in the rde_softreconfig_in_done handler that resulted in multiple runs of the out stage of the softreconfig pipeline. OK benno@
2021-05-05Refactor vm_instance to return error value directly.dv
vmd(8)'s vm_instance function set unsupported errno values. Change the api to directly return an error (either errno or custom vmd error). "go for it" -mlarkin@
2021-05-05Emit an integer instead of a string in JSON outputjob
We added the "AS123" format because this is what the other tools did and there was the goal to have equal output. However, many in the community have voiced complaints about having to do string conversions. OK deraadt@ claudio@
2021-05-05Clarify -n behaviorjob
Input from John Heasley OK claudio@
2021-05-05Document new reload behaviour. From Ashton FaggClaudio Jeker
OK jmc@
2021-05-04gzread(3) doesn't always set errno, so use gzerror(3)dv
Compression errors from libz don't set errno. OK mlarkin@
2021-05-04Move unused task queue stuff to the attic.dv
Was added about 4 years ago, but hasn't been used and linked into the build. Discussed with dlg@ and mlarkin@. mlarkin@: "Let's remove for now..."
2021-05-04Init debug logging state before attempting to log.dv
Error messages related to bad configuration were not flushing to stderr. OK mlarkin@
2021-05-04okay, prevent pkg_* from looking into /usr/local BUT special-case quirksMarc Espie
2021-05-04More comment changes to reflect reality. No functional change.Claudio Jeker
2021-05-04Update comment to match reality.Claudio Jeker
2021-05-04not yet, need to figure out how to fix quirks firstMarc Espie
2021-05-04and do the same thing to pkg_mklocatedbMarc Espie
2021-05-04prevent the base pkg tools from looking under /usr/localMarc Espie
2021-05-04Similar to rsync repo delay deletes for rrdp repos to after processingClaudio Jeker
all files. Now RRDP has a weak sync mechanism and therefor not all unreferenced files can be removed, instead look at the list of removes which were part of the delta processing and remove those files. Warn and keep the file if a delta specifies to remove a file which is actually still referenced. OK benno@
2021-05-03When negotiating multiprotocol capabilities only fall ack to AID_INET whenClaudio Jeker
no capability was sent to the peer (this happens if the multiprotocol capability got disabled). It is possible that local and remote systems end up with no shared AFI/SAFI pair. In this case the connection will not send or should not receive any UPDATE messages. The previous behaviour of falling back to AID_INET in that case can result in problematic behaviour when sessions are missconfigured. OK benno@, deraadt@
2021-05-03Print the timestamps both formatted and as a time in seconds field inClaudio Jeker
the various JSON object that have time values. OK benno@
2021-05-03Like in the session engine do not inline the addr2sa call into connect andClaudio Jeker
bind. The len argument is modified by addr2sa but is also used as argument in the call and it is undefined if the value of len in connect is set to the value "returned" by addr2sa(). Should fix connect issues seen on Linux system. OK denis@
2021-05-02Fix having hostnames in the listen on statement. Regression introduced inMartijn van Duren
r1.39. Issue originally reported by Anton Kasimov via rob@. OK claudio@
2021-05-01Retire OpenBSD/sgi.Visa Hankala
OK deraadt@
2021-04-29Linting: remove duplicate struct definition (plus whitespace)dv
"sure" mlarkin@
2021-04-29Use relative reference URIs in Location header on directory redirects.dv
This adds support for front-ending httpd(8) with a TLS-terminating gateway like relayd(8) that forwards unencrypted http traffic. Previously httpd(8) would use a full URL in the Location header in 301 redirects when a user-agent requests a directory but without the trailing '/'. If the user-agent originally connected with https, this caused the redirected url to be http. This change conforms to RFC7231 section 7.1.2. Reported by Vincent Lee. OK claudio@
2021-04-28build eeprom on riscv64Jonathan Gray
2021-04-27Add IMSG_CTL_SHOW_RTR to the list of restriced control messages.Claudio Jeker
2021-04-27Add RFC 6286 to the list of RFC bgpd supports.Claudio Jeker
OK job@
2021-04-27Check for possible bgpid collision on open. RFC 6286 defines that thisClaudio Jeker
check needs to be done for iBGP sessions but not for eBGP sessions. On conflict log an error and send a notification with ERR_OPEN_BGPID suberror. Reported by cjt (melissa_cjt at 163.com) OK benno@