summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2022-08-19Check the resources in ROAs and RSCs against EE certsTheo Buehler
The resources delegated in the RFC 3779 extensions of the EE cert for ROAs or RSCs can be a subset of the resources in the auth chain. So far we compared that the resources of ROAs and RSCs are covered by the auth chain, which is not entirely correct. Extract the necessary data from the EE cert into rpki-client's own data structures, then verify that the EE cert's resources cover the ones claimed in the ROA or RSC. Do this as part or ROA and RSC parsing, that the EE cert's resources are covered by the auth chain is checked in valid_x509() later on. All this is a bit more annoying and intrusive than it should be... ok claudio job
2022-08-19Fix nexthop lookup for connected routes.Claudio Jeker
In knexthop_true_nexthop() connected routes need to be handled specially. If a nexthop is directly reachable the gateway needs to remain the same. There is no nexthop set for F_CONNECTED kroutes. A very similar trick is used in rde_rib.c::nexthop_update() but was forgotten here. Regression noticed by Daniel Jakots (danj at chown.me). OK tb@
2022-08-19Split -p into own synopsisKlemens Nanni
Platform-dependent preparation of the filesystem required by the boot loader only ever creates a new fileystem without instaling using any bootstrap files. To reflect reality, turn # installboot -nvp vnd0 Using / as root would install bootstrap on /dev/rvnd0c using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot would newfs 545c9bdf92aa18f9.i into # ./obj/installboot -nvp vnd0 would newfs 4db2c0e89e0d3268.i and error out if -p is combined with -r or stages: $ man -hl./installboot.8 installboot [-nv] [-r root] disk [stage1 [stage2]] installboot [-nv] -p disk Feedback OK millert
2022-08-19spelling;Jason McIntyre
2022-08-19Add local bind mode, where ypldap manages the YP binding file itselfJonathan Matthew
rather than relying on ypbind to do it, which also means you don't need portmap running. In this mode, ypldap binds its rpc sockets to loopback, so YP services are only available to the host it's running on. The previous behaviour, now called portmap bind mode, is still the default. encouragement from deraadt@ and dlg@
2022-08-18In kroute_insert() fix the check for multipath routes. Use a helper variableClaudio Jeker
since krm is only set for IPv4 routes but not for IPv6 ones. OK tb@
2022-08-18Remove dangling ASPA references until we land real supportJob Snijders
OK tb@
2022-08-18There is no need to pass the fd to send_rtmsg(), the fd is always theClaudio Jeker
one from kr_state and removing this argument helps portability. OK tb@
2022-08-17Use memset() instead of bzero().Claudio Jeker
OK tb@ deraadt@
2022-08-17Convert bzero() to memset(), bcmp() to memcmp() and bcopy() to memcpy().Claudio Jeker
The memory regions passed to memcpy() can not overlap so no need for memmove(). OK tb@ deraadt@
2022-08-17Clarify and tidy up some commentsJob Snijders
OK tb@
2022-08-17Just use struct kif and kill struct kif_node. No need for this extraClaudio Jeker
struct. OK tb@
2022-08-17Just 2 newline changes.Claudio Jeker
2022-08-17Add default case to switch to silence a warning seen with gcc.Claudio Jeker
2022-08-16Do not send kroutes from the RDE to the FIB with the true_nexthop butClaudio Jeker
instead use exit_nexthop (the nexthop from BGP). The FIB code can then do the lookup and replace the nexthop in the FIB. This solves an issue when multiple nexthops change concurrently. In the RDE the decision process handles these changes ansynchronously which resulted in bad true_nexthops to be sent to the FIB. The exit_nethop is stable so the data sent to the FIB is always correct. Fix a bug in netxhop tracking introduced in 1.280. On RTM_CHANGE when the nexthop of a kroute changes a knexthop_send_update() must be sent but knexthop_track() does not do that because the kroute did not change. Introduce a knexthop_update() function for this case instead. OK tb@
2022-08-15Add initial piece for softraid(4) support on arm64Klemens Nanni
arm64 is the only currently supported OpenBSD platform which both a) supports booting off root on softraid(4) (kernel and bootloader) and b) is an EFI platform (as far as installboot(8) is concerned). Currently, installboot treats softraid root volumes as regular devices, ignoring ignores chunk devices completely. Teach installboot the first bits of softraid support for EFI: installing the single-stage boot loader on chunks rather than the volume. Copy over sparc64's softraid stage-1 code as-is and make its stage-2 a NOOP: # ./obj/installboot -v sd4 Using / as root installing bootstrap on /dev/rsd4c using first-stage /usr/mdec/BOOTAA64.EFI sd4: softraid volume with 1 disk(s) sd0a: installing boot blocks on /dev/rsd0c copying /usr/mdec/BOOTAA64.EFI to /tmp/installboot.KuBD4zkfpM/efi/boot/bootaa64.efi writing /tmp/installboot.KuBD4zkfpM/efi/boot/startup.nsh arm64 miniroot fits and boots with this. OK stsp As of now, EFI partitions must still be created manually as installboot's '-p' does not support softraid at all (next missing piece for root on softraid on arm64 installations to work out-of-the-box).
2022-08-15Neither clt_descreq nor clt_descresp in struct client need to be void *.Claudio Jeker
They both are only used as struct http_descriptor. OK tb@
2022-08-15For FCGI_END_REQUEST reset the clt struct similar to what is done in theClaudio Jeker
file and other cases. Especially when the session uses keep-alive it is important to set TOREAD_HTTP_HEADER so that the state machine knows what's next. OK op@
2022-08-15plug some memory leaks in server_file_index when failures occurOmar Polo
namelist and its entries are not freed if escape_html fails or if we fail in the inner loop. Move scandir later so it's closer to the for loop and handle escape_html and url_encode failures. With lots of help from tb, thanks! ok tb@
2022-08-15plug a fd leak in read_errdoc if fstat fails or if the file is emptyOmar Polo
tweak/ok tb@
2022-08-12Implement slowcgi_timeout() to actually kill the backend bgpctl process.Claudio Jeker
If that succeeds the fcgi session will be terminated the regular way. If it fails close all fds and finish the request. Sending a SIGTERM to a read only bgpctl process should be fine at any point. Also reduce the timeout to 30sec. This is not long enough to dump a full rib but nobody should do that. OK tb@
2022-08-12No need to make a deep copy of the EE certTheo Buehler
The EE Cert has just been allocated as part of deserializing the cms. There is no need for an expensive copy, we can just keep a reference. ok job
2022-08-12pkg_add.1: fix typo in pkg stem with flavor exampleLandry Breuil
from Frederic Nowak, thanks !
2022-08-12Use break instead of return so that a HEAD request still consumes all data.Claudio Jeker
OK op@
2022-08-12fix regression introduced in previous commit. HEAD replies don't have aOmar Polo
body so server_fcgi_error shouldn't print the end marker. OK claudio@
2022-08-11correctly handle an abnormal fastcgi termination. httpd handles theOmar Polo
disconnection from the fastcgi application via server_file_error which assumes that the reply was completey done. However, if the fastcgi reply wasn't complete (e.g. because slowcgi hit the timeout) the HTTP client are left "hanging" and waiting for a reply until they give up. This adds a server_fcgi_error callback to handle the "no headers" and "incomplete data" cases and properly close the reply before falling back to server_file_error. OK claudio@
2022-08-10Clarify warning related to ROA eContentJob Snijders
2022-08-10Disallow AS Resources extension on ROA EE certificatesJob Snijders
The ROA specification (RFC 6482 section 4) is a bit underspecified, however in the wild the RFC 3779 AS Resources extension never ever appears on ROA EE certificates, as it serves no purpose in the validation process. OK tb@
2022-08-10Reverse NULL check in krVPN6_change()Theo Buehler
This matches the VPN4 code and avoids a NULL deref in the else branch. ok claudio
2022-08-10More kroute_nexthop cleanup. Mainly use direct assignment instead ofClaudio Jeker
memcpy(). Additionally replace a bzero() with memset() and remove to superfluous bzero calls. OK tb@
2022-08-10Fix logic in network_dump_upcall()Claudio Jeker
The nexthop can be valid but still a NULL pointer. In that case just set the aid like it is done for invalid nexthops. If the nexthop is set by explicitly specifying one then include the exit_nexthop, that is the nexthop that is relevant for BGP. Further cleanup the function as usual. OK tb@
2022-08-10Decrease how long to wait for the remote peer to send IO before giving upJob Snijders
If a repository is uncommunicative, rpki-client will try other transports, or come back later (because of a next crontab invocation). OK claudio@
2022-08-10fixup header for bgpctl show network so it lines up again.Claudio Jeker
OK tb@
2022-08-09Make the http code respect MAX_CONN_TIMEOUT and fail connects once theyClaudio Jeker
hit this timeout. This is in line with the rsync code. OK tb@ job@
2022-08-08Unify the maximum idle IO timeout for RSYNC & HTTPSJob Snijders
OK claudio@
2022-08-08Set rsync connection timeout to 15 seconds.Job Snijders
OK sthen@
2022-08-07zap extra space in usage added by mistake in last commit.Omar Polo
2022-08-06add a -t flag to change the request timeoutOmar Polo
original diff from Alfred Morgan (alfred [at] 54 dot org) ok florian@ and manpage tweaks by me.
2022-08-06match recent Intel CPUs in fw_update(8)Jonathan Gray
Intel CPUs mostly used to have processor name strings of the form cpu0: Intel(R) Pentium(R) M processor 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz, 06-0d-06 cpu0: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.61 MHz, 06-3d-04 recent CPUs use cpu0: 11th Gen Intel(R) Core(TM) i5-1130G7 @ 1.10GHz, 30009.37 MHz, 06-8c-01 cpu0: 12th Gen Intel(R) Core(TM) i5-12400, 4390.71 MHz, 06-97-02 cpu0: 12th Gen Intel(R) Core(TM) i7-1260P, 1995.55 MHz, 06-9a-03 change pattern used to handle this also covers oddities such as cpu0: Genuine Intel(R) CPU @ 600MHz, 600.10 MHz cpu0: Genuine Intel(R) CPU @ 1.00GHz, 1000.13 MHz, 06-26-01 cpu0: Genuine Intel(R) CPU L2400 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz, 06-0e-08 test chips use "Genuine Intel(R) CPU 0000"
2022-08-05Support wildcards in fw_update patternsAndrew Fresh
Up to two wildcards, since we have to work around the way ksh does things. Tweaks and suggestions from kn@ and halex@
2022-08-04Once all files from argv have been read the main process can unveil toClaudio Jeker
the cachedir and if output files are written to outputdir. In -f mode the unveil can be read-only in normal operation rwc is required because the main process writes the RRDP files and also does the cleanup at the end of the run. Input from tb@ and mestre@, OK tb@
2022-08-04SWITCH section in ifconfig(8) no longer exists; point people at VEB insteadStefan Sperling
2022-08-04Correct a markup mistake found with mandoc -T lint:Ingo Schwarze
Use .Vt instead of .Tn for mode_t and dev_t. While here, also use .Fa rather than .Va for st_rdev (as usual for struct fields), and correctly mark up st_mode and S_IFMT.
2022-08-04change some 4.4BSD references to earlier releasesJonathan Gray
ok schwarze@
2022-08-03Add comment that NEXTHOP_FLAPPED is only set on oldstate of a nexthop.Claudio Jeker
2022-08-03Fix a modify after free error in kroute_remove()Claudio Jeker
knexthop_validate() will modify the kroute the nexthop points to. Because of this knexthop_validate() needs to be called before the to be removed kroute is freed. Move the code into kroute_remove[46] so the order is correct. Problem found and fix tested by sthen@. OK sthen@ tb@
2022-08-03Fix possible NULL dereference in knexthop_validate().Claudio Jeker
kroute_match() may return NULL so setting kn->ifindex should only be done if the kroute is valid. Also set the ifindex to 0 in kroute_detach_nexthop(). Based on a bigger diff which is OK tb@ and sthen@
2022-07-30vmctl create accepts exactly one argumentKlemens Nanni
Make "vmctl create -s3G 1.img 2.img" fail instead of just creating 1.img and ignoring 2.img. OK dv cheloha
2022-07-30we mention interim BSD releases so change some 4.4BSD use to 4.3BSD-RenoJonathan Gray
ok jmc@ schwarze@
2022-07-29don't leave user guessing after latest "no need to update"Marc Espie
show a "processing" message when we're actually grabbing data (often from the net). This should be really quick in most cases, but sometimes, it might take minutes (like for texlive), so that we know what's going on.