sync with OpenBSD -current

This commit is contained in:
purplerain 2024-05-31 15:25:42 +00:00
parent 2d58860211
commit e0194c3e7d
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
15 changed files with 121 additions and 147 deletions

View file

@ -418,7 +418,6 @@
./usr/include/dev/ipmivar.h ./usr/include/dev/ipmivar.h
./usr/include/dev/isa ./usr/include/dev/isa
./usr/include/dev/isa/ad1848var.h ./usr/include/dev/isa/ad1848var.h
./usr/include/dev/isa/cs4231var.h
./usr/include/dev/isa/elink.h ./usr/include/dev/isa/elink.h
./usr/include/dev/isa/essreg.h ./usr/include/dev/isa/essreg.h
./usr/include/dev/isa/essvar.h ./usr/include/dev/isa/essvar.h

View file

@ -1,5 +1,5 @@
# #
# $OpenBSD: daily,v 1.98 2024/05/16 11:33:59 solene Exp $ # $OpenBSD: daily,v 1.99 2024/05/30 14:29:05 sthen Exp $
# From: @(#)daily 8.2 (Berkeley) 1/25/94 # From: @(#)daily 8.2 (Berkeley) 1/25/94
# #
# For local additions, create the file /etc/daily.local. # For local additions, create the file /etc/daily.local.
@ -50,7 +50,7 @@ if [ -d /tmp -a ! -L /tmp ]; then
find -x . \ find -x . \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \ \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
-o -path './tmux-*' \) -prune -o \ -o -path './tmux-*' \) -prune -o \
-type f -and ! -path './*.shm' -atime +7 -delete 2>/dev/null -type f -and ! -path './*.s[eh]m' -atime +7 -delete 2>/dev/null
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
! -path ./.ICE-unix ! -name . \ ! -path ./.ICE-unix ! -name . \
-delete >/dev/null 2>&1; } -delete >/dev/null 2>&1; }

View file

@ -1,4 +1,4 @@
/* $OpenBSD: asn1object.c,v 1.10 2022/11/26 16:08:56 tb Exp $ */ /* $OpenBSD: asn1object.c,v 1.14 2024/05/29 17:23:05 tb Exp $ */
/* /*
* Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org> * Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org>
* *
@ -17,6 +17,7 @@
#include <openssl/asn1.h> #include <openssl/asn1.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/objects.h>
#include <err.h> #include <err.h>
#include <stdio.h> #include <stdio.h>
@ -25,9 +26,14 @@
#include "asn1_local.h" #include "asn1_local.h"
static void static void
hexdump(const unsigned char *buf, size_t len) hexdump(const unsigned char *buf, int len)
{ {
size_t i; int i;
if (len <= 0) {
fprintf(stderr, "<negative length %d>\n", len);
return;
}
for (i = 1; i <= len; i++) for (i = 1; i <= len; i++)
fprintf(stderr, " 0x%02hhx,%s", buf[i - 1], i % 8 ? "" : "\n"); fprintf(stderr, " 0x%02hhx,%s", buf[i - 1], i % 8 ? "" : "\n");
@ -223,6 +229,7 @@ do_asn1_object_test(struct asn1_object_test *aot)
ASN1_OBJECT *aobj = NULL; ASN1_OBJECT *aobj = NULL;
uint8_t buf[1024]; uint8_t buf[1024];
const uint8_t *p; const uint8_t *p;
uint8_t *der = NULL;
uint8_t *q; uint8_t *q;
int err, ret; int err, ret;
int failed = 1; int failed = 1;
@ -268,6 +275,15 @@ do_asn1_object_test(struct asn1_object_test *aot)
aot->der_len)) aot->der_len))
goto failed; goto failed;
der = NULL;
ret = i2d_ASN1_OBJECT(aobj, &der);
if (!asn1_compare_bytes("ASN1_OBJECT DER", der, ret, aot->der,
aot->der_len))
goto failed;
free(der);
der = NULL;
ASN1_OBJECT_free(aobj); ASN1_OBJECT_free(aobj);
aobj = NULL; aobj = NULL;
@ -300,6 +316,7 @@ do_asn1_object_test(struct asn1_object_test *aot)
failed: failed:
ASN1_OBJECT_free(aobj); ASN1_OBJECT_free(aobj);
free(der);
return failed; return failed;
} }
@ -332,7 +349,7 @@ asn1_object_bad_content_test(void)
int failed = 1; int failed = 1;
p = asn1_object_bad_content1; p = asn1_object_bad_content1;
len = sizeof(asn1_object_bad_content1); len = sizeof(asn1_object_bad_content1);
if ((aobj = c2i_ASN1_OBJECT(NULL, &p, len)) != NULL) { if ((aobj = c2i_ASN1_OBJECT(NULL, &p, len)) != NULL) {
fprintf(stderr, "FAIL: c2i_ASN1_OBJECT() succeeded with bad " fprintf(stderr, "FAIL: c2i_ASN1_OBJECT() succeeded with bad "
"content 1\n"); "content 1\n");
@ -340,7 +357,7 @@ asn1_object_bad_content_test(void)
} }
p = asn1_object_bad_content2; p = asn1_object_bad_content2;
len = sizeof(asn1_object_bad_content2); len = sizeof(asn1_object_bad_content2);
if ((aobj = c2i_ASN1_OBJECT(NULL, &p, len)) != NULL) { if ((aobj = c2i_ASN1_OBJECT(NULL, &p, len)) != NULL) {
fprintf(stderr, "FAIL: c2i_ASN1_OBJECT() succeeded with bad " fprintf(stderr, "FAIL: c2i_ASN1_OBJECT() succeeded with bad "
"content 2\n"); "content 2\n");
@ -455,12 +472,11 @@ asn1_object_large_oid_test(void)
ASN1_OBJECT *aobj = NULL; ASN1_OBJECT *aobj = NULL;
uint8_t buf[1024]; uint8_t buf[1024];
const uint8_t *p; const uint8_t *p;
uint8_t *der = NULL;
uint8_t *q; uint8_t *q;
int ret; int ret;
int failed = 1; int failed = 1;
failed = 0;
p = asn1_large_oid_der; p = asn1_large_oid_der;
aobj = d2i_ASN1_OBJECT(NULL, &p, sizeof(asn1_large_oid_der)); aobj = d2i_ASN1_OBJECT(NULL, &p, sizeof(asn1_large_oid_der));
if (aobj == NULL) { if (aobj == NULL) {
@ -475,6 +491,52 @@ asn1_object_large_oid_test(void)
sizeof(asn1_large_oid_der))) sizeof(asn1_large_oid_der)))
goto failed; goto failed;
der = NULL;
ret = i2d_ASN1_OBJECT(aobj, &der);
if (!asn1_compare_bytes("ASN1_OBJECT DER", der, ret, asn1_large_oid_der,
sizeof(asn1_large_oid_der)))
goto failed;
failed = 0;
failed:
ASN1_OBJECT_free(aobj);
free(der);
return failed;
}
static int
asn1_object_i2d_errors(void)
{
ASN1_OBJECT *aobj = NULL;
int ret;
int failed = 1;
if ((ret = i2d_ASN1_OBJECT(NULL, NULL)) > 0) {
fprintf(stderr, "FAIL: i2d_ASN1_OBJECT(NULL, NULL) returned %d, "
"want <= 0\n", ret);
goto failed;
}
if ((aobj = OBJ_nid2obj(NID_undef)) == NULL) {
fprintf(stderr, "FAIL: OBJ_nid2obj() failed\n");
goto failed;
}
if (OBJ_get0_data(aobj) != NULL) {
fprintf(stderr, "FAIL: undefined obj didn't have NULL data\n");
goto failed;
}
if ((ret = i2d_ASN1_OBJECT(aobj, NULL)) > 0) {
fprintf(stderr, "FAIL: i2d_ASN1_OBJECT() succeeded on undefined "
"object\n");
goto failed;
}
failed = 0;
failed: failed:
ASN1_OBJECT_free(aobj); ASN1_OBJECT_free(aobj);
@ -490,6 +552,7 @@ main(int argc, char **argv)
failed |= asn1_object_bad_content_test(); failed |= asn1_object_bad_content_test();
failed |= asn1_object_txt_test(); failed |= asn1_object_txt_test();
failed |= asn1_object_large_oid_test(); failed |= asn1_object_large_oid_test();
failed |= asn1_object_i2d_errors();
return (failed); return (failed);
} }

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: ssl.8,v 1.69 2021/02/12 14:19:11 sthen Exp $ .\" $OpenBSD: ssl.8,v 1.70 2024/05/30 14:06:23 tb Exp $
.\" .\"
.\" Copyright (c) 1999 Theo de Raadt, Bob Beck .\" Copyright (c) 1999 Theo de Raadt, Bob Beck
.\" All rights reserved. .\" All rights reserved.
@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.Dd $Mdocdate: February 12 2021 $ .Dd $Mdocdate: May 30 2024 $
.Dt SSL 8 .Dt SSL 8
.Os .Os
.Sh NAME .Sh NAME
@ -173,62 +173,3 @@ You can also sign the key yourself, using the command:
.Xr smtpd 8 , .Xr smtpd 8 ,
.Xr sshd 8 , .Xr sshd 8 ,
.Xr starttls 8 .Xr starttls 8
.Sh HISTORY
Prior to Sept 21, 2000,
there were problems shipping fully functional implementations of these
protocols, as such shipment would include shipping
.Em into
the United States.
RSA Data Security Inc (RSADSI) held the patent on the RSA algorithm in the
United States, and because of this, free implementations of RSA were
difficult to distribute and propagate.
(The RSA patent was probably more effective at preventing the adoption of
widespread international integrated crypto than the much maligned ITAR
restrictions were.)
Prior to
.Ox 2.8 ,
these libraries shipped without the RSA algorithm -- all such functions
were stubbed to fail.
Since RSA is a key component of SSL version 2, this meant that SSL version
2 would not work at all.
SSL version 3 and TLS version 1 allow for the exchange of keys via
mechanisms that do not involve RSA, and would work with the shipped version
of the libraries, assuming both ends could agree to a cipher suite and key
exchange that did not involve RSA.
Likewise, the SSH1 protocol in
.Xr ssh 1
uses RSA, so it was similarly encumbered.
.Pp
For instance, another typical alternative is DSA, which is not encumbered
by commercial patents (and lawyers).
.Pp
The HTTPS protocol used by web browsers (in modern incarnations) allows for
the use of SSL version 3 and TLS version 1, which in theory allows for
encrypted web transactions without using RSA.
Unfortunately, all the popular web browsers buy their cryptographic code
from RSADSI.
Predictably, RSADSI would prefer that web browsers used their patented
algorithm, and thus their libraries do not implement any non-RSA cipher and
keying combination.
The result of this was that while the HTTPS protocol allowed for many
cipher suites that did not require the use of patented algorithms, it was
very difficult to use these with the popular commercially available
software.
Prior to version 2.8,
.Ox
allowed users to download RSA enabled versions of the shared libssl and
libcrypto libraries which allowed users to enable full functionality without
recompiling the applications.
This method is now no longer needed, as the fully functional
libraries ship with the system.
However, this entire debacle is worth remembering when choosing
software and vendors.
.Pp
Due to multiple flaws in the protocols, SSL version 2 was removed in
.Ox 5.2
and SSL version 3 was disabled in
.Ox 5.7 .
Users and programs should use TLS version 1.2 instead.
.Pp
This document first appeared in
.Ox 2.5 .

View file

@ -1,4 +1,4 @@
/* $OpenBSD: cpu.c,v 1.117 2024/05/29 15:32:06 jsg Exp $ */ /* $OpenBSD: cpu.c,v 1.118 2024/05/30 04:16:25 tb Exp $ */
/* /*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com> * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@ -1485,13 +1485,14 @@ cpu_unidle(struct cpu_info *ci)
#endif #endif
int cpu_suspended;
#ifdef SUSPEND #ifdef SUSPEND
void cpu_hatch_primary(void); void cpu_hatch_primary(void);
void (*cpu_suspend_cycle_fcn)(void) = cpu_wfi; void (*cpu_suspend_cycle_fcn)(void) = cpu_wfi;
label_t cpu_suspend_jmpbuf; label_t cpu_suspend_jmpbuf;
int cpu_suspended;
void void
cpu_suspend_cycle(void) cpu_suspend_cycle(void)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pmapae.c,v 1.71 2023/05/30 08:30:01 jsg Exp $ */ /* $OpenBSD: pmapae.c,v 1.72 2024/05/30 10:56:24 mpi Exp $ */
/* /*
* Copyright (c) 2006-2008 Michael Shalayeff * Copyright (c) 2006-2008 Michael Shalayeff
@ -990,7 +990,7 @@ pmap_pinit_pd_pae(struct pmap *pmap)
if (cpu_meltdown) { if (cpu_meltdown) {
int i; int i;
va = (vaddr_t)km_alloc(4 * NBPG, &kv_any, &kp_zero, &kd_nowait); va = (vaddr_t)km_alloc(4 * NBPG, &kv_any, &kp_zero, &kd_waitok);
if (va == 0) if (va == 0)
panic("%s: kernel_map out of virtual space!", __func__); panic("%s: kernel_map out of virtual space!", __func__);
if (!pmap_extract(pmap_kernel(), if (!pmap_extract(pmap_kernel(),

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_fork.c,v 1.258 2024/05/20 10:32:20 claudio Exp $ */ /* $OpenBSD: kern_fork.c,v 1.259 2024/05/29 18:55:45 claudio Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/* /*
@ -688,12 +688,8 @@ proc_trampoline_mi(void)
struct proc *p = curproc; struct proc *p = curproc;
SCHED_ASSERT_LOCKED(); SCHED_ASSERT_LOCKED();
clear_resched(curcpu()); clear_resched(curcpu());
mtx_leave(&sched_lock);
#if defined(MULTIPROCESSOR)
__mp_unlock(&sched_lock);
#endif
spl0(); spl0();
SCHED_ASSERT_UNLOCKED(); SCHED_ASSERT_UNLOCKED();

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_lock.c,v 1.73 2024/03/26 18:18:30 bluhm Exp $ */ /* $OpenBSD: kern_lock.c,v 1.74 2024/05/29 18:55:45 claudio Exp $ */
/* /*
* Copyright (c) 2017 Visa Hankala * Copyright (c) 2017 Visa Hankala
@ -97,9 +97,6 @@ ___mp_lock_init(struct __mp_lock *mpl, const struct lock_type *type)
if (mpl == &kernel_lock) if (mpl == &kernel_lock)
mpl->mpl_lock_obj.lo_flags = LO_WITNESS | LO_INITIALIZED | mpl->mpl_lock_obj.lo_flags = LO_WITNESS | LO_INITIALIZED |
LO_SLEEPABLE | (LO_CLASS_KERNEL_LOCK << LO_CLASSSHIFT); LO_SLEEPABLE | (LO_CLASS_KERNEL_LOCK << LO_CLASSSHIFT);
else if (mpl == &sched_lock)
mpl->mpl_lock_obj.lo_flags = LO_WITNESS | LO_INITIALIZED |
LO_RECURSABLE | (LO_CLASS_SCHED_LOCK << LO_CLASSSHIFT);
WITNESS_INIT(&mpl->mpl_lock_obj, type); WITNESS_INIT(&mpl->mpl_lock_obj, type);
#endif #endif
} }

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sched_bsd.c,v 1.91 2024/03/30 13:33:20 mpi Exp $ */ /* $OpenBSD: sched_bsd.c,v 1.92 2024/05/29 18:55:45 claudio Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*- /*-
@ -57,9 +57,7 @@
uint64_t roundrobin_period; /* [I] roundrobin period (ns) */ uint64_t roundrobin_period; /* [I] roundrobin period (ns) */
int lbolt; /* once a second sleep address */ int lbolt; /* once a second sleep address */
#ifdef MULTIPROCESSOR struct mutex sched_lock;
struct __mp_lock sched_lock;
#endif
void update_loadavg(void *); void update_loadavg(void *);
void schedcpu(void *); void schedcpu(void *);
@ -351,12 +349,11 @@ mi_switch(void)
struct proc *nextproc; struct proc *nextproc;
struct process *pr = p->p_p; struct process *pr = p->p_p;
struct timespec ts; struct timespec ts;
int oldipl, s;
#ifdef MULTIPROCESSOR #ifdef MULTIPROCESSOR
int hold_count; int hold_count;
int sched_count;
#endif #endif
assertwaitok();
KASSERT(p->p_stat != SONPROC); KASSERT(p->p_stat != SONPROC);
SCHED_ASSERT_LOCKED(); SCHED_ASSERT_LOCKED();
@ -365,7 +362,6 @@ mi_switch(void)
/* /*
* Release the kernel_lock, as we are about to yield the CPU. * Release the kernel_lock, as we are about to yield the CPU.
*/ */
sched_count = __mp_release_all_but_one(&sched_lock);
if (_kernel_lock_held()) if (_kernel_lock_held())
hold_count = __mp_release_all(&kernel_lock); hold_count = __mp_release_all(&kernel_lock);
else else
@ -411,6 +407,9 @@ mi_switch(void)
nextproc = sched_chooseproc(); nextproc = sched_chooseproc();
/* preserve old IPL level so we can switch back to that */
oldipl = MUTEX_OLDIPL(&sched_lock);
if (p != nextproc) { if (p != nextproc) {
uvmexp.swtch++; uvmexp.swtch++;
TRACEPOINT(sched, off__cpu, nextproc->p_tid + THREAD_PID_OFFSET, TRACEPOINT(sched, off__cpu, nextproc->p_tid + THREAD_PID_OFFSET,
@ -426,18 +425,13 @@ mi_switch(void)
SCHED_ASSERT_LOCKED(); SCHED_ASSERT_LOCKED();
/* /* Restore proc's IPL. */
* To preserve lock ordering, we need to release the sched lock MUTEX_OLDIPL(&sched_lock) = oldipl;
* and grab it after we grab the big lock. SCHED_UNLOCK(s);
* In the future, when the sched lock isn't recursive, we'll
* just release it here.
*/
#ifdef MULTIPROCESSOR
__mp_unlock(&sched_lock);
#endif
SCHED_ASSERT_UNLOCKED(); SCHED_ASSERT_UNLOCKED();
assertwaitok();
smr_idle(); smr_idle();
/* /*
@ -468,8 +462,8 @@ mi_switch(void)
*/ */
if (hold_count) if (hold_count)
__mp_acquire_count(&kernel_lock, hold_count); __mp_acquire_count(&kernel_lock, hold_count);
__mp_acquire_count(&sched_lock, sched_count + 1);
#endif #endif
SCHED_LOCK(s);
} }
/* /*

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sched.h,v 1.70 2024/01/24 19:23:38 cheloha Exp $ */ /* $OpenBSD: sched.h,v 1.71 2024/05/29 18:55:45 claudio Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */ /* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*- /*-
@ -199,52 +199,30 @@ void remrunqueue(struct proc *);
func(); \ func(); \
} while (0) } while (0)
#if defined(MULTIPROCESSOR) extern struct mutex sched_lock;
#include <sys/lock.h>
/*
* XXX Instead of using struct lock for the kernel lock and thus requiring us
* XXX to implement simplelocks, causing all sorts of fine-grained locks all
* XXX over our tree to be activated, the sched_lock is a different kind of
* XXX lock to avoid introducing locking protocol bugs.
*/
extern struct __mp_lock sched_lock;
#define SCHED_ASSERT_LOCKED() \ #define SCHED_ASSERT_LOCKED() \
do { \ do { \
splassert(IPL_SCHED); \ MUTEX_ASSERT_LOCKED(&sched_lock); \
KASSERT(__mp_lock_held(&sched_lock, curcpu())); \
} while (0) } while (0)
#define SCHED_ASSERT_UNLOCKED() \ #define SCHED_ASSERT_UNLOCKED() \
do { \ do { \
KASSERT(__mp_lock_held(&sched_lock, curcpu()) == 0); \ MUTEX_ASSERT_UNLOCKED(&sched_lock); \
} while (0) } while (0)
#define SCHED_LOCK_INIT() __mp_lock_init(&sched_lock) #define SCHED_LOCK_INIT() mtx_init(&sched_lock, IPL_SCHED)
#define SCHED_LOCK(s) \ #define SCHED_LOCK(s) \
do { \ do { \
s = splsched(); \ (s) = 0; /* XXX cleanup useless argument */ \
__mp_lock(&sched_lock); \ mtx_enter(&sched_lock); \
} while (/* CONSTCOND */ 0) } while (/* CONSTCOND */ 0)
#define SCHED_UNLOCK(s) \ #define SCHED_UNLOCK(s) \
do { \ do { \
__mp_unlock(&sched_lock); \ (void)s; /* XXX cleanup useless argument */ \
splx(s); \ mtx_leave(&sched_lock); \
} while (/* CONSTCOND */ 0) } while (/* CONSTCOND */ 0)
#else /* ! MULTIPROCESSOR */
#define SCHED_ASSERT_LOCKED() splassert(IPL_SCHED);
#define SCHED_ASSERT_UNLOCKED() /* nothing */
#define SCHED_LOCK_INIT() /* nothing */
#define SCHED_LOCK(s) s = splsched()
#define SCHED_UNLOCK(s) splx(s)
#endif /* MULTIPROCESSOR */
#endif /* _KERNEL */ #endif /* _KERNEL */
#endif /* _SYS_SCHED_H_ */ #endif /* _SYS_SCHED_H_ */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rcs.c,v 1.321 2022/12/26 19:16:00 jmc Exp $ */ /* $OpenBSD: rcs.c,v 1.322 2024/05/30 10:25:58 jsg Exp $ */
/* /*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved. * All rights reserved.
@ -2581,6 +2581,7 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp)
follow = 0; follow = 0;
free(brev); free(brev);
brev = NULL;
} }
if (cvs_specified_date != -1) if (cvs_specified_date != -1)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rde_update.c,v 1.167 2024/05/29 10:41:12 claudio Exp $ */ /* $OpenBSD: rde_update.c,v 1.168 2024/05/30 08:29:30 claudio Exp $ */
/* /*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@ -464,7 +464,7 @@ up_get_nexthop(struct rde_peer *peer, struct filterstate *state, uint8_t aid)
break; break;
case AID_INET6: case AID_INET6:
case AID_VPN_IPv6: case AID_VPN_IPv6:
if (peer->local_v4_addr.aid == AID_INET6) if (peer->local_v6_addr.aid == AID_INET6)
peer_local = &peer->local_v6_addr; peer_local = &peer->local_v6_addr;
break; break;
case AID_FLOWSPECv4: case AID_FLOWSPECv4:

View file

@ -1,4 +1,4 @@
/* $OpenBSD: repo.c,v 1.58 2024/05/20 15:51:43 claudio Exp $ */ /* $OpenBSD: repo.c,v 1.59 2024/05/30 12:33:15 claudio Exp $ */
/* /*
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@ -1787,17 +1787,19 @@ repo_cleanup_entry(FTSENT *e, struct filepath_tree *tree, int cachefd)
} }
break; break;
case FTS_D: case FTS_D:
if (e->fts_level == FTS_ROOTLEVEL) if (e->fts_level == FTS_ROOTLEVEL) {
fts_state.type = BASE_DIR; fts_state.type = BASE_DIR;
fts_state.rp = NULL;
}
if (e->fts_level == 1) { if (e->fts_level == 1) {
/* rpki.example.org or .rrdp / .rsync */ /* rpki.example.org or .rrdp / .rsync */
if (strcmp(".rsync", e->fts_name) == 0) { if (strcmp(".rsync", e->fts_name) == 0)
fts_state.type = RSYNC_DIR; fts_state.type = RSYNC_DIR;
fts_state.rp = NULL; else if (strcmp(".rrdp", e->fts_name) == 0)
} else if (strcmp(".rrdp", e->fts_name) == 0) {
fts_state.type = RRDP_DIR; fts_state.type = RRDP_DIR;
fts_state.rp = NULL; else
} fts_state.type = BASE_DIR;
fts_state.rp = NULL;
} }
if (e->fts_level == 2) { if (e->fts_level == 2) {
/* rpki.example.org/repository or .rrdp/hashdir */ /* rpki.example.org/repository or .rrdp/hashdir */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rrdp_delta.c,v 1.13 2024/03/22 03:38:12 job Exp $ */ /* $OpenBSD: rrdp_delta.c,v 1.14 2024/05/30 09:54:59 job Exp $ */
/* /*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com> * Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@ -220,7 +220,8 @@ delta_content_handler(void *data, const char *content, int length)
if (dxml->scope == DELTA_SCOPE_PUBLISH) if (dxml->scope == DELTA_SCOPE_PUBLISH)
if (publish_add_content(dxml->pxml, content, length) == -1) if (publish_add_content(dxml->pxml, content, length) == -1)
PARSE_FAIL(p, "parse failed - content too big"); PARSE_FAIL(p, "parse failed, delta element for %s too "
"big", dxml->pxml->uri);
} }
static void static void

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rrdp_snapshot.c,v 1.9 2024/03/22 03:38:12 job Exp $ */ /* $OpenBSD: rrdp_snapshot.c,v 1.10 2024/05/30 09:54:59 job Exp $ */
/* /*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com> * Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@ -200,7 +200,8 @@ snapshot_content_handler(void *data, const char *content, int length)
if (sxml->scope == SNAPSHOT_SCOPE_PUBLISH) if (sxml->scope == SNAPSHOT_SCOPE_PUBLISH)
if (publish_add_content(sxml->pxml, content, length) == -1) if (publish_add_content(sxml->pxml, content, length) == -1)
PARSE_FAIL(p, "parse failed - content too big"); PARSE_FAIL(p, "parse failed, snapshot element for %s "
"too big", sxml->pxml->uri);
} }
static void static void