1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 15:25:38 -08:00
Commit Graph

29934 Commits

Author SHA1 Message Date
claudio
16b0c81bb5 bgpd and smtpd include their own imsgbuf_read_nofd() implementation.
Adjust that one as well apart from that the conversion to the new
imsgbuf_read read behaviour is trivial.

OK tb@
2024-11-21 13:22:21 +00:00
claudio
668e5ba9d8 Convert the common imsgbuf_read calls to the post EAGAIN world.
OK tb@
2024-11-21 13:21:33 +00:00
claudio
b82d3e10b9 Use msgbuf_queuelen() where approriate
OK tb@
2024-11-21 13:20:00 +00:00
claudio
31be28ca73 Use imsgbuf_queuelen() instead of accessing the w.queue member.
OK tb@
2024-11-21 13:18:37 +00:00
claudio
9cbf9e90b0 Use imsgbuf_clear() where appropriate instead of msgbuf_clear().
OK tb@
2024-11-21 13:17:56 +00:00
claudio
dd7efffe3c Rename imsg_init, imsg_clear, imsg_read, imsg_write and imsg_flush to
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush.

This separates the imsgbuf API from the per-imsg API.

OK tb@
2024-11-21 13:17:01 +00:00
claudio
c1aa9554a3 Convert imsg_write() callers to the new simplified return logic.
OK tb@
2024-11-21 13:16:06 +00:00
claudio
4fb4351109 Convert ibuf_write() callers to new simplified return logic.
OK tb@
2024-11-21 13:13:37 +00:00
claudio
9aadc625f5 Convert msgbuf_write() callers to the new return logic.
OK tb@
2024-11-21 13:12:19 +00:00
claudio
baf8650937 Convert msgbuf_write() callers to the new return logic.
OK tb@
2024-11-21 13:12:11 +00:00
claudio
e4dbe30d1e Use ibuf_write() to send BGP messages to peers instead of msgbuf_write().
This code does not need to pass fds so there is no need to call msgbuf_write.

OK tb@
2024-11-21 13:11:33 +00:00
claudio
ce33693d52 Introduce imsg_write() and use it instead of msgbuf_write().
imsg_write() is just a thin wrapper around msgbuf_write(). So this is
mostly search and replace.

OK tb@
2024-11-21 13:10:18 +00:00
claudio
22e9111291 Use imsg_flush() instead of implementing the same by hand.
OK tb@
2024-11-21 13:08:32 +00:00
claudio
f978fa48b9 imsg_flush no longer returns EAGAIN. Simplify proc_flush_imsg() accordingly.
Issue spotted by op@
2024-11-21 13:06:19 +00:00
claudio
674395a05a ibuf_get_string() was added to the ibuf API, remove local version
OK tb@
2024-11-21 13:05:23 +00:00
tb
b4964d69b7 rpki-client: use macros for skipping rather than hardcoded numbers
ok claudio
2024-11-14 10:28:59 +00:00
otto
be5c6adac6 Take into account how long the dns probe takes before decding to
punt. A single res_query() call can return immediately (e.g. success
or the nameservers are unreachable), or take quite some time,
depending on how many nameservers are configured. So measure the
actual time it takes and decide wat to do based on that.
Early version from beck@; ok claudio@ deraadt@
2024-11-13 15:51:50 +00:00
tb
30a085025d Second sweep of foosz -> num_foos and friends
Binary change in main.o and tal.o due to an assertion change and in spl.o
due to line number changes

looks good to claudio, ok clang + sha256
2024-11-13 12:51:03 +00:00
tb
381ee59950 Rename ips/as and ipsz/asz to ips/ases, num_ips/num_ases
Having a single letter to distinguish a length from a pointer is error
prone. This results in binary change only in validate.c and cert.c due
to a line wrap resulting in line number changes and in cert.c there's in
addition two asserts that change.

checked with/ok job
2024-11-12 09:23:07 +00:00
kn
6b1aed72d5 sync curly braces markup, fix indent
Replace literal braces with .Brq, use lists, replace literal 'foo options'
with .Ar option ... and indent options where they belong.

This highlights config parser differences between daemons:
- dhcpleased: requires empty blocks, e.g. 'interface em0 {}' (Brq Op Ar option ...)
- rad:  lets you omit them, e.g.          'interface em0'    (Op Brq Ar option ...)

Feedback OK jmc
2024-11-09 12:40:10 +00:00
afresh1
3df6484578 Remove unnecessary variable
It turns out that DOWNLOAD_ONLY was just used as the inverse of INSTALL,
so use the one variable instead of two.

This also uncovered some small cleanups.
2024-11-09 02:40:57 +00:00
afresh1
14dcac1e21 Add a -l flag to list drivers or files
This provides a more easily machine readable list than the normal output.
2024-11-09 02:19:48 +00:00
kettenis
db15c72a19 Only install a second copy of the bootloader if the EFI System Partition
is at least 1MB.  This should prevent us from filling up the tiny ESPs
that we used to create a few releases ago.

ok deraadt@
2024-11-08 10:43:07 +00:00
yasuoka
3a9fd06ccc The comparator of the RBtree for the IP addresses was broken.
Also, log verbosely when ignoring accounting request.
2024-11-07 16:00:11 +00:00
bluhm
18e6fc661f Move syslogd(8) TLS handshake callback from read to write handler.
syslogd should immediately detect that the incoming TLS handshake
is complete.  The old logic detected it when the first log message
over TLS was arriving.  For now only a debug message is logged, but
the callback will be used to print the common name of the client
certificate in the future.

OK tb@
2024-11-07 10:12:18 +00:00
mpi
53407cb03f Add multi-line strings support to the bt(5) script parser.
From Christian Ludwig
2024-11-07 09:20:09 +00:00
yasuoka
7af3c8953e Log the username when rejecting by ipcp. 2024-11-07 06:37:18 +00:00
bluhm
7f22b52a24 Fix vmd(8) logging to syslog(3) from child process.
Log messages from vmd(8) child processes went to /dev/null.  Re-exec
set the -n option, which in turn sets vmd_noaction and vmd_debug.
Debugging means no more syslog(3), but stderr, which is /dev/null
for a daemon.
Remove -n from child re-exec, it does not have any effect except
looging.  Pass on the -d flag when debugging.  The VMD_VERBOSE
defines are more confusing than useful, just write -v like all the
other options.  Rework creation of execvp arguments.  Do not use
tab in syslog messages, space is sufficient.

OK mlarkin@ hshoexer@ dv@
2024-11-06 23:04:45 +00:00
bluhm
06d0d09838 vmd(8) logs psp(4) firmware version.
On vmd startup, log the AMD SEV PSP API and build number.

from hshoexer@; OK mlarkin@
2024-11-06 22:06:16 +00:00
miod
c18ef1e4e9 Add -g option to get the index of the current virtual terminal.
This can help scripts using wsconsctl display.focus to perform vt switches.

From NetBSD via Sergiy Kopchalyuk.
2024-11-06 17:14:03 +00:00
bluhm
e7a1ead9e6 Fix broken vmd(8) build on arm64 due to missing psp_setup().
The psp.c source is restricted in makefile with .if ${MACHINE} ==
"amd64" so use #ifdef __amd64__ around the call to psp_setup().  On
arm64 set vmd_psp_fd to an invalid value.

OK hshoexer@ mlarkin@
2024-11-06 14:26:20 +00:00
job
64468f86ca Reference SendHoldTimer RFC in bgpd(8)
OK claudio@
2024-11-06 12:01:39 +00:00
bluhm
5db0dbc53e vmd(8) resets psp(4)
Use shutdown and init to reset psp(4) on vmd(8) startup.  This helps
when hacking on vmd(8) and crashing it.  The psp(4) reset cleans
up all remnants of dead VMs from psp(4).  Otherwise one would have
to reboot the machine.

from hshoexer@; OK mlarkin@
2024-11-05 23:16:46 +00:00
jmc
605f2cbb7e mark up fix; from jesper wallin 2024-11-05 19:36:53 +00:00
lucas
496b8bf985 Check for pfxsz, not the pointer
ok tb
2024-11-05 18:58:35 +00:00
tb
f814cda1d9 Avoid zero-sized allocations
ok claudio
2024-11-05 18:09:16 +00:00
claudio
45a3ee5e7e ncomplete is set but never used. Noticed by cc
OK tb@
2024-11-05 09:18:35 +00:00
tb
490bf47853 rpki-client: check validity time in filemode
Currently the validation indicator only takes the certificate's status
into account. In case everything check out, check the product's life
time and the signature path's expiration moment before printing OK.

should fix an issue encountered by job
looks good to claudio
2024-11-05 06:05:35 +00:00
jca
2119819d27 Ignore extra groups that don't fit in the buffer passed to getgrouplist(3)
Our kernel supports 16 groups (NGROUPS_MAX), but nothing prevents
an admin from adding a user to more groups.  With that tweak we'll keep
on ignoring them instead of potentially reading past the buffer passed to
getgrouplist(3).  That behavior is explicitely described in initgroups(3).

ok millert@ gilles@
2024-11-04 21:59:15 +00:00
job
c4e27ad9e4 Update reference 2024-11-04 11:39:12 +00:00
deraadt
6b5bf2e84b Some atoi -> strtonum conversions; ok denis 2024-11-04 11:12:52 +00:00
afresh1
8eda69bd84 Allow downloading firmware without root
If we are downloading as non-root, we can't drop privileges using ftp,
but sometimes that is OK.

While here, improve the DOWNLOAD_ONLY variable name.
2024-11-04 01:24:00 +00:00
afresh1
fcfe10d69c Make fw_update -p consistent
Previously, if using fw_update -Fp ..., the argument to -p was
treated as a destination path, unless it looked like a URL.

This is too complex, if we want to be able to change the download
destination, that wll need to be a new option.
2024-11-04 00:34:47 +00:00
job
318f05722c Improve detection of gaps in Manifestissuance
It is helpful for network operators, publication point operators, and CA
operators to have more insight into whether the RP noticed an issuance
gap between two versions of a given manifest.

* high number of gaps all the time might be an indication the RP is not
  refreshing often enough
* the CA is trying to issue manifests more than once a second
* the RFC 8181 publication server's ingress API endpoint has issues
* the RFC 8181 publication client has trouble reaching the server
* the CA's private keys (RPKI + BPKI) are used on a second (cloned) system
* the CA's issuance database is broken

Correlation opportunity: detection of a gap means some of the CA's
intermediate states were occluded from the RP; the RP operator might
want to correlate this to traffic shifts in BGP or publication point
reachability issues.

Going forward, emit a warning per manifest, adds metrics to the
openmetrics output, and displays a summary at the end of the run about
issuance gaps.

OK tb@
2024-11-02 12:30:28 +00:00
claudio
f4d4619418 Use imsg_get_fd() to extract the fd from an imsg.
OK tb@
2024-10-31 13:37:44 +00:00
kettenis
fbfcabeaad Install a copy of the UEFI bootloader in /efi/openbsd on the EFI system
partition.  This will allow us to create boot options for the firmware
boot manager that other OSes won't interfere with.

ok phessler@, tobhe@, kn@
2024-10-30 16:22:33 +00:00
sthen
d87a8abac1 print pppoe tags as hex dumps rather than strvis-a-like'd text, unless
they're tags where text is likely. strvis on random cookies is hard to read
and compare, and it's easier to convert 0x05dc than \005\334 to 1500 for
PPP-Max-Payload.  ok claudio dlg
2024-10-30 10:36:28 +00:00
jsg
e22ff83ad5 remove unneeded conf.h include 2024-10-30 07:28:17 +00:00
jsg
a74a190b71 directly use dev_t for swdevt[], remove struct swdevt
ok mpi@ miod@
2024-10-30 06:16:27 +00:00
bluhm
4cfb78b57c Add fw_update pattern for AMD SEV firmware used with psp(4).
from hshoexer@; input deraadt@
2024-10-30 00:04:46 +00:00
claudio
baad1f5d65 Fix logic to return CTL_RES_NOSUCHPEER. The RB_EMPTY check needs to be
reversed since no error should be printed if there are no neighbors
configured (yet).
OK tb@
2024-10-29 12:35:37 +00:00
tb
92388deed9 relayd: add support for client certificates
This feature has been requested many times over the years. Various patches
were provided by Asherah Connor, Rivo Nurges, Markus Läll and maybe others.
These patches always stalled for various reasons.

From Sören Tempel, mostly based on Asherah's latest patch.

ok florian tb
2024-10-28 19:56:18 +00:00
claudio
8045fa89e1 Remove two fatalx calls in pt_fill since they are wrong.
L3VPN withdraws don't carry a labelstack (see util.c::nlri_get_vpn4()).
OK tb@
2024-10-28 12:05:00 +00:00
deraadt
36ac5f1008 Add support for performing a sysupgrade from a path. This is convenient
for offline machines if you can pull the snapshot or release to there there,
but want sysupgrade to locally perform signify validation before performing
the /home/_sysupgrade and other boot-upgrade steps.
ok florian
2024-10-25 03:42:06 +00:00
claudio
60eaea58b5 Adjust ldapclient prototype to prevent an "argument of type 'int[2]' with
mismatched bound" warning.
OK tb@
2024-10-24 11:47:36 +00:00
claudio
bf431fff95 Append fd to the variable names proc, rsync, rrdp, http since these variables
are used to store file descriptors.
OK tb@
2024-10-23 12:09:14 +00:00
jsg
c2bc71950d remove duplicate RT_BUF_SIZE define 2024-10-22 22:50:49 +00:00
claudio
0a6e69e457 Use imsg_get_fd() like everywhere else.
OK florian@ dv@
2024-10-22 15:19:48 +00:00
claudio
82ba26c4dc VM_MAP_BUSY and VM_MAP_WANTLOCK will be removed soon, prep for that.
OK dlg@
2024-10-20 11:21:24 +00:00
miod
ce1663765c a.out is no longer the commonly encountered binary file format, the world has
moved to ELF.

Move the a.out specific defines and macros, but the MID_xxx values, from
<sys/exec.h> to <a.out.h>, and update the few userland binaries which really
need these defines (i.e. boot-related tools for old architectures) to
explicitly include <a.out.h> when needed.

"Fine" deraadt@
2024-10-16 18:47:47 +00:00
tb
9a67f0c9d9 rpki-client: sprinkle some const
EVP_PKEY_get0_* were made const correct in OpenSSL 3 and now cause the
build of rpki-client to emit warnings. Of course no one is able to see
these warnings because they are hidden in all the deprecation vomit.

Makes rpki-client build cleanly against OpenSSL 3 when configured with
--with-openssl-cflags=-DOPENSSL_SUPPRESS_DEPRECATED.

ok claudio deraadt job
2024-10-16 06:09:45 +00:00
deraadt
c0030deff4 Be more eager to install qcpas firmware (more pattern matches) 2024-10-13 00:00:41 +00:00
afresh1
fe7b35343c Make fw_update -a mean all
When downloading or installing, not just deleting.

Noticed by Paul de Weerd
Help with manual wording from jmc@
Just fix -a, deraadt@
2024-10-12 23:56:23 +00:00
deraadt
be53cb2d9a The fw keys have been added to the signify key bundles. sysupgrade will
now extract the fw key also, so that pre-upgrade fw_update can fetch
the most uptodate firmware.
ok sthen
2024-10-11 14:12:05 +00:00
florian
f2270df8ab Always print account URI on first creation of an account key.
This was hidden behind -v but it seems useful to always have this when
creating a new account.

As sthen points out in his previous commit:
This is useful if you want to set a CAA DNS record restricting
issuance to a specific user account.

OK deraadt
2024-10-10 09:39:35 +00:00
claudio
a2dc744ed1 Make it possible to configure tcp md5 and ipsec on rtr as well
Single out the auth_config yacc rules. Even though this requires an
extra merge_auth_conf() function to handle manual IPsec setups but
even with that this seems like a net gain.

There is no rtr cache that does tcp md5 on OpenBSD so those bits remain
untested for now.
OK tb@
2024-10-09 10:01:29 +00:00
jsg
44cbff73fe correct indentation 2024-10-09 01:52:11 +00:00
claudio
cd16358eb0 Extend the socket handover from parent to rtr process to also include teardown
This is needed to support tcp md5sum and ipsec auth for rtr.
OK tb@
2024-10-08 12:28:09 +00:00
jsg
efa8f74bcb remove unused struct 2024-10-08 05:28:11 +00:00
sthen
de0ff35887 When acme-client is run with -v, show the account URI from the Location
header sent by the server in response to the newAccount API call (used for
every cert request). This is useful if you want to set a CAA DNS record
restricting issuance to a specific user account, rather than just "all of
$whichever_acme_CA".  ok florian
2024-10-07 23:47:00 +00:00
jmc
ef76af9e7d use the Ox macro instead of "OpenBSD"; 2024-10-07 15:57:15 +00:00
sthen
bdcafcd9f6 merge unbound 1.21.1 2024-10-07 15:38:21 +00:00
sthen
3be9681c7f Fix unbound CVE-2024-8508, put a limit on resources used for handling
DNS compression. OK florian

From unbound 1.21.1 (rest will be merged shortly).
2024-10-07 15:35:11 +00:00
tb
eef0ad36fb Add comment accidentally omitted on commit 2024-10-07 14:45:33 +00:00
tb
c4bf180607 update crl number draft link 2024-10-07 14:21:51 +00:00
deraadt
0c49c08fbb The two usual use cases are sysupgrade and sysupgrade -s, jumping
forward to the same key, or the key+.1.  But sometimes you want to
update an older machine far forward (either with -s, or with -R), and
the required key might not exist on-disk.  Since getting the key isn't
automated, people make some poor decisions to get the key.  Previous
to 7.6 the situation was worse, (and obviously older releases will have
the old sysupgrade script, though you can copy this one to those machines
and it will work, but please do that securely..)
Moving forward this improves the workflow: a new set of keybundles
(signed by older keys) have been made available so that sysupgrade
can securely and automatically download the required key.
ok job tb beck sthen
2024-10-07 13:21:53 +00:00
tb
81fe2f6d7d rpki-client: fix validity interval check
The language in RFC 5280, section 4.1.2.5 includes the end points of the
validity interval.

Reported by Tom Harrison

ok claudio job
2024-10-07 12:19:52 +00:00
tb
c0214ebbd4 rpki-client: fix seqnum upper bound
An ASN1_INTEGER doesn't contain the ASN.1 encoding in its data. It contains
a BIGNUM. In particular, there's no padding octet for integers with the top
bit of the top octet set. Do the check the dumb way and check all the parts
individually: non-negative, not larger than 20 octets and bit 159 not set.

Reported by Tom Harrison

ok claudio job
2024-10-07 12:18:31 +00:00
kn
b389496969 drop redundant AF attach ioctl
SIOCAIFADDR_IN6 to configure an IPv6 address does everything SIOCIFAFATTACH
does, i.e. it enables IPv6 on the interface if not done so already.

vm.conf(5) 'local inet6' works as before.

OK mlarkin
2024-10-07 04:29:01 +00:00
jsg
c6b676a53b error on long locator lines, don't overflow buffers
found with afl, feedback and ok millert@
2024-10-05 01:07:38 +00:00
dv
a4052f0f2c Move some PCI MMIO defines from vmm(4) kernel headers to userland.
vmm(4) doesn't need this information anymore. vmd(8) is the only
consumer of this information.

ok mlarkin@
2024-10-02 17:05:56 +00:00
claudio
69319e3ad6 No need to check as->established before calling pfkey_remove().
Remove the extra checks in the caller and simplify some code because of that.
OK tb@
2024-10-02 09:45:29 +00:00
tb
a02f709497 Adding pkg_add from stdin hasn't worked in ages. It was something
we inherited from the initial implemention on FreeBSD which has
made no sense in years.

prompted by a diff by Johannes Thyssen Tishman
from espie
2024-10-02 09:14:08 +00:00
tb
9acbf608f1 Extend Log->system to support the same features as BaseState->system
In order to support privsep in tags, we need to be able to pass some
code values in child/parent.

from espie, tested by sthen, ok giovanni
2024-10-01 18:48:29 +00:00
claudio
d3e7ac1607 Use auth_conf.method instead of auth_state.method. The latter is always 0. 2024-10-01 18:33:16 +00:00
claudio
63c2b4966a Explicitly set peer.auth_conf.method, the auth_state value is never
initialized in the SE so bgpctl did always see 0, auth_conf.method
is on the other hand properly shared.
OK tb@
2024-10-01 18:31:10 +00:00
claudio
8f5501c15d In merge_peers also copy over the auth_conf from the new peer to the old
since that one is kept.
OK tb@
2024-10-01 18:29:34 +00:00
claudio
14a2db8031 Fix typo in comment
OK tb@
2024-10-01 18:28:17 +00:00
claudio
cbc52301d8 Adjust to the pfkey changes in bgpd.
OK tb@
2024-10-01 11:50:15 +00:00
claudio
d762911438 Rework the pfkey and tcp md5 API to not depend on struct peer.
Instead use struct auth_config and struct auth_state in the pfkey calls
and those tcp_md5 calls where it matters.

This is preparation work to allow RTR to use TCP MD5 as well.
OK tb@
2024-10-01 11:49:24 +00:00
claudio
477ac4f17e Improve some currently impossible error path in log_ext_subtype().
Mainly handle unknown ext-communities better and handle the special
case of type == -1.
OK tb@
2024-09-30 12:54:12 +00:00
claudio
bc3692b580 In bgpd_rtr_connect() do the setsockopt dance for IP_TOS and TCP_NODELAY
before calling connect(). This way it happens for sure and on top the TOS
is already set on the initial SYN.
OK tb@
2024-09-30 09:42:24 +00:00
kn
4f37b6d834 sync synopsis and usage, sort commands, fix their spacing
OK input lucas
2024-09-29 14:36:13 +00:00
tb
352e6c5d7c rpki-client: free deltas in rrdp_session_parse() as in rrdp_repo_free()
ok claudio
2024-09-27 12:55:03 +00:00
tb
27e47f522c rpki-client: check for getline error when reading the skiplist file
ok claudio
2024-09-27 12:52:58 +00:00
jsg
65bbee46ca remove unneeded includes; ok dv@ mlarkin@ 2024-09-26 01:45:13 +00:00
florian
175054dbe4 Improve description of -f.
ok sthen, florian

Committing on behalf of jmc as requested.
2024-09-25 16:26:37 +00:00
jmc
0e47a61a5c correct macro for -R entry; 2024-09-25 15:08:42 +00:00
claudio
6c19f566ed When generating UPDATE handle the message size limit better.
First of all warn that a prefix was dropped. In the generate an update
code handle possible overflows of attributes and NLRI and withdraw the
affected prefix. This way the peer will not have stale data.
OK tb@
2024-09-25 14:46:51 +00:00
sthen
2d63a5f7c1 sysupgrade: add -R #.# to try to use a specific release version rather
than the immediate +0.1. print an https://ftp.openbsd.org/... URL where
the new signify pubkey can be found if not present.

no guarantees: we only test +0.1, but jumping further does work quite
often (and if tight on disk, can work better than multiple steps) -
this avoids editing the script if you're going to do it anyway.

"Only upgrades from one version to the next are tested. Skipping
versions may work. Downgrading is unlikely to work."

discussed with deraadt chris florian, ok deraadt
2024-09-25 13:55:23 +00:00
deraadt
e3b2bc7ec4 document why sys/param.h is used 2024-09-25 04:19:36 +00:00
jmc
cc67ceff40 - VM(s) -> VMs
- simpler tense
- fix the -width parameter
- add -nosplit to AUTHORS
2024-09-24 20:02:39 +00:00
mlarkin
b999ee2ed7 vmd(8) manpage change for shutdown behaviour
Document the shutdown behaviour for vmd(8). Suggested via bugs@
via eric at mulh.net.

ok jmc@, bluhm@
2024-09-24 19:34:01 +00:00
florian
8aa961cf3a Remove -r toggle and generally be less smart.
The default is to install the next release. Snapshots are only
installed when invoked with -s.

The logic on what to do per default got out of hand and it was very
difficult to reason about what sysupgrade(8) actually did. deraadt@
then suggested that we should dumb it all down, sysupgrade(8) is there
to upgrade from one release to the next. More advance usage needs to
be requested by the user.

With all this simplification we can now be a bit more smart to work
out what the next release is. With that, snapshots right before a
release can be sysupgrade(8)'ed to the official release.

OK sthen on a previous version that was much more complicated but
allowed shortly-before-release -> release upgrade

testing sthen on this version

Guidance, prodding & OK deraadt
2024-09-24 07:33:35 +00:00
aisha
e95f2867f8 add route-to example
ok benno@
2024-09-21 05:37:26 +00:00
mlarkin
4716c5471a vmm.h is a needed include now 2024-09-21 04:12:18 +00:00
jsg
479c151d34 remove unneeded semicolons; checked by millert@ 2024-09-20 02:00:46 +00:00
tb
acc4629865 Shift 1U rather than 1 to avoid -Wsign-compare whining
claudio agress
2024-09-19 20:48:36 +00:00
job
824a3a1adc Move rpki-client to 9.3
requested by tb@
2024-09-19 13:45:07 +00:00
claudio
21826c937b Remove spaces before EOL. 2024-09-19 08:55:22 +00:00
denis
620bdc4b89 document how to add a restricted socket
OK claudio@
2024-09-19 06:12:46 +00:00
millert
6a4024dc43 zic: cherrypick support for %z in time zone formats
This extends the zic input format to add support for %z, which
expands to a UTC offset in as-short-as-possible ISO 8601 format.
It's intended to better support zones that do not have an established
abbreviation already.  tzdata2024b and higher require a version of
zic that supports the %z format.  From upstream tzcode.  OK beck@
2024-09-18 17:05:50 +00:00
bluhm
8e5fcb6eaf Mention psp(4) in vm.conf(5) man page.
from hshoexer@; OK mlarkin@
2024-09-16 22:30:01 +00:00
jsg
8fbd69a9e8 __STDC_VERSION__ not __STDC_VERSION; ok miod@ 2024-09-15 05:49:05 +00:00
yasuoka
4946f6941b Improve the log messages and white spaces. 2024-09-15 05:31:23 +00:00
yasuoka
cfa11a856b Keep the number of requests for a DAE server below 64 to avoid
congestion.
2024-09-15 05:29:11 +00:00
yasuoka
eff8f878b4 Add "delete" command to "radiusctl ipcp". Also, send "stop" that was
missing when disconnecting all when acct-{on,off} received.
2024-09-15 05:26:05 +00:00
yasuoka
065d5e7678 Handle EAGAIN properly and fix the log when disconnected. 2024-09-15 05:14:32 +00:00
tb
904d9c60a4 Reintroduce check that CRL Number is in range
The CRL number draft clarified what ignoring means and it includes checking
that the CRL number is well-formed again. So do this but continue to ignore
the value for any other purpose. This refactors x509_convert_seqnum() into
a couple of helpers. There's some duplication between crl_check_crl_number()
and crl_parse_crl_number() which could be removed if anyone cares.

tweaks/ok job
2024-09-12 10:33:25 +00:00
bluhm
f4b47ae8c1 Implement AMD SEV support in vmd(8).
To launch a guest with AMD SEV enabled, vmd needs to do a few things:
- retrieve ASID used by guest on VM creation
- provide ASID to psp(4)
- let psp(4) encrypt memory used intially by guest
- run guest
- release resources held by psp(4) on guest shutdown
To enable SEV for a guest use the parameter "sev" in the guest's vm
section in vm.conf.

from hshoexer@; OK mlarkin@
2024-09-11 15:42:52 +00:00
tb
9ea7911738 Use doc/html link for consistency 2024-09-10 18:37:42 +00:00
tb
cbb03a40aa Add reference to the manifest numbers draft
ok job
2024-09-10 18:34:19 +00:00
claudio
e386eeb169 Be more careful with aspath that have 0 length (aka the empty AS_PATH).
Again malloc(0) is not portable and calling memcpy with a NULL pointer
and a 0 length is not allowed by the C standard.

OK tb@
2024-09-10 09:38:45 +00:00
claudio
07ef39656b community_copy needs to check if nentries is 0 and handle that specially.
Calling malloc / reallocarray with a 0 size is not portable and the
memcpy with a possible NULL pointer as source and 0 len is seen as UB
by newer C standards (grmbl).

OK tb@
2024-09-10 08:53:20 +00:00
claudio
e5e5eb1a03 AID_VPN_IPv4 and AID_VPN_IPv6 require a labellen that is non-zero.
OK tb@
2024-09-10 08:47:51 +00:00
claudio
d9facda501 Enfroce proper encoding of ASPA announce/withdraw PDU.
An announce PDU requires at least one provider ASnum while a withdraw
must not include any provider ASnums. The first is mandated by the ASPA
profile and the 2nd by the 8210bis draft.

Further cleanup some leftovers from the old per-AFI split of ASPA.
OK tb@
2024-09-10 08:41:13 +00:00
claudio
c2b3ae36d4 Use reallocarray() instead of recallocarray(), this code does not need the
extra security measures of recallocarray() which adds a lot of overhead.
OK tb@
2024-09-10 08:37:52 +00:00
claudio
457c3e2447 Handle the CLUSTER_LIST attribute as described in RFC7606
Just drop the attribute if received from an external peer.
Treat as withdraw if the len is 0 or not % 4.
OK tb@
2024-09-09 15:00:45 +00:00
claudio
173da11705 There is no need for an explicit size check for IMSG_RECONF_ASPA_TAS
imsg_get_data() does the same and produces the same error.
OK tb@
2024-09-09 14:58:47 +00:00
claudio
6116e163fc Use msgbuf_init() instead of hand initalizing the msgbuf.
OK tb@
2024-09-09 12:59:49 +00:00
tb
f452fe1ca0 rpki-client: fix typos in comments and one in a warning message 2024-09-08 07:23:36 +00:00
mpi
6243ff0b1b Interpret the argument of '%c' as an integer instead of a string.
From Christian Ludwig.
2024-09-06 07:58:50 +00:00
claudio
6e684d5963 Bump version 2024-09-05 20:28:42 +00:00
jmc
79053326db have sysmerge and sysupgrade Xr each other;
diff originally from peter n. m. hansteen

ok ajacoutot
2024-09-05 06:39:53 +00:00
jmc
6b028660f0 note that "|" and ":include:" are disallowed for root;
prompted by mail from illya meyer

ok gilles
2024-09-05 06:33:04 +00:00
jmc
1893b9de7c remove note falsely claiming that :include: is disallowed
(it is, but only for root, which i'll address in separate commit);

ok mp gilles
2024-09-05 05:51:46 +00:00
job
5f0faded70 Remove deprecated '-r' command line option
OK tb@ claudio@
2024-09-04 15:46:43 +00:00
claudio
3e51611556 Qualifying nexthops via BGP does not properly work since nexthops need
to be rechecked when a BGP route is added (or changed).

We need to revalidate nexthops on inserts (kroute_insert) and
on change (krX_change but only for AID_INET and AID_INET6 -- no nexthops
in the other tables) the nexthop needs to be updated.

Only validate nexthops if 'nexthop qualify via bgp' is enabled. For route
changes the code can depend on the F_NEXTHOP flag.

Fix for: https://github.com/openbgpd-portable/openbgpd-portable/issues/81
OK tb@
2024-09-04 15:06:36 +00:00
claudio
7f893e0cba Call pfkey_remove() only after the Session Engine finished reloading its
configuration. Doing so before could result in some messages being sent
out without proper TCP-MD5 signature.

Fix for: https://github.com/openbgpd-portable/openbgpd-portable/issues/82
OK tb@
2024-09-04 13:30:10 +00:00
sthen
98bc733b08 merge unbound 1.21.0 2024-09-04 09:36:40 +00:00
sthen
a43524d9cc import unbound 1.21.0, ok phessler florian 2024-09-04 09:35:34 +00:00
op
ad8d242dc7 fix some typos; courtesy of codespell; ok gilles@ 2024-09-03 18:27:04 +00:00
tb
be9e59b4e0 Make state file parsing errors more explicit. Also don't leak the deltas.
joint effort with/ok claudio
2024-09-03 15:37:03 +00:00
job
20c31060e0 Also gate SPL statistics behind 'experimental' command line option
This changes the JSON output, without -x some keys are missing from 'metadata'

OK tb@
2024-09-03 15:04:48 +00:00
claudio
dbcd1c3144 In rrdp_session_parse() set the last_reset time to now if the .state file
does not exist.
OK tb@
2024-09-03 13:31:31 +00:00
gilles
7ceb9f7fe4 bump version 2024-09-03 12:07:40 +00:00
job
6dd0ae0386 Increase number of concurrent RRDP session handler slots
OK claudio@
2024-09-02 11:56:22 +00:00
yasuoka
7c8f25c75a Coding of the handling of errors for <sequence number> hadn't be completed. 2024-09-02 04:45:22 +00:00
tb
aec10a2afd Unify proc_parser_* as far as possible and reasonable
ok claudio job
2024-08-29 13:46:28 +00:00
job
1f3d741282 Improve warning message
Requested by claudio@

OK tb@
2024-08-29 09:54:13 +00:00