sync
This commit is contained in:
parent
3751effe59
commit
29ec20d7b2
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cpio.c,v 1.33 2017/09/16 07:42:34 otto Exp $ */
|
/* $OpenBSD: cpio.c,v 1.34 2023/06/26 18:00:59 millert Exp $ */
|
||||||
/* $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $ */
|
/* $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -294,7 +294,7 @@ cpio_rd(ARCHD *arcn, char *buf)
|
|||||||
arcn->sb.st_rdev = (dev_t)asc_ul(hd->c_rdev, sizeof(hd->c_rdev), OCT);
|
arcn->sb.st_rdev = (dev_t)asc_ul(hd->c_rdev, sizeof(hd->c_rdev), OCT);
|
||||||
val = asc_ull(hd->c_mtime, sizeof(hd->c_mtime), OCT);
|
val = asc_ull(hd->c_mtime, sizeof(hd->c_mtime), OCT);
|
||||||
if (val > MAX_TIME_T)
|
if (val > MAX_TIME_T)
|
||||||
arcn->sb.st_mtime = INT_MAX; /* XXX 2038 */
|
arcn->sb.st_mtime = MAX_TIME_T;
|
||||||
else
|
else
|
||||||
arcn->sb.st_mtime = val;
|
arcn->sb.st_mtime = val;
|
||||||
arcn->sb.st_mtim.tv_nsec = 0;
|
arcn->sb.st_mtim.tv_nsec = 0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: tar.c,v 1.70 2022/03/01 21:19:11 sthen Exp $ */
|
/* $OpenBSD: tar.c,v 1.71 2023/06/26 18:00:59 millert Exp $ */
|
||||||
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
|
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -411,7 +411,7 @@ tar_rd(ARCHD *arcn, char *buf)
|
|||||||
arcn->sb.st_size = (off_t)asc_ull(hd->size, sizeof(hd->size), OCT);
|
arcn->sb.st_size = (off_t)asc_ull(hd->size, sizeof(hd->size), OCT);
|
||||||
val = asc_ull(hd->mtime, sizeof(hd->mtime), OCT);
|
val = asc_ull(hd->mtime, sizeof(hd->mtime), OCT);
|
||||||
if (val > MAX_TIME_T)
|
if (val > MAX_TIME_T)
|
||||||
arcn->sb.st_mtime = INT_MAX; /* XXX 2038 */
|
arcn->sb.st_mtime = MAX_TIME_T;
|
||||||
else
|
else
|
||||||
arcn->sb.st_mtime = val;
|
arcn->sb.st_mtime = val;
|
||||||
arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
|
arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
|
||||||
@ -788,7 +788,7 @@ reset:
|
|||||||
if (arcn->sb.st_mtime == 0) {
|
if (arcn->sb.st_mtime == 0) {
|
||||||
val = asc_ull(hd->mtime, sizeof(hd->mtime), OCT);
|
val = asc_ull(hd->mtime, sizeof(hd->mtime), OCT);
|
||||||
if (val > MAX_TIME_T)
|
if (val > MAX_TIME_T)
|
||||||
arcn->sb.st_mtime = INT_MAX; /* XXX 2038 */
|
arcn->sb.st_mtime = MAX_TIME_T;
|
||||||
else
|
else
|
||||||
arcn->sb.st_mtime = val;
|
arcn->sb.st_mtime = val;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: tty_subs.c,v 1.17 2016/08/26 04:22:13 guenther Exp $ */
|
/* $OpenBSD: tty_subs.c,v 1.18 2023/06/26 16:58:50 millert Exp $ */
|
||||||
/* $NetBSD: tty_subs.c,v 1.5 1995/03/21 09:07:52 cgd Exp $ */
|
/* $NetBSD: tty_subs.c,v 1.5 1995/03/21 09:07:52 cgd Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -90,14 +90,14 @@ void
|
|||||||
tty_prnt(const char *fmt, ...)
|
tty_prnt(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
char buf[8192];
|
||||||
|
|
||||||
va_start(ap, fmt);
|
if (ttyoutf == NULL)
|
||||||
if (ttyoutf == NULL) {
|
|
||||||
va_end(ap);
|
|
||||||
return;
|
return;
|
||||||
}
|
va_start(ap, fmt);
|
||||||
(void)vfprintf(ttyoutf, fmt, ap);
|
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
safe_print(buf, ttyoutf);
|
||||||
(void)fflush(ttyoutf);
|
(void)fflush(ttyoutf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +132,8 @@ void
|
|||||||
paxwarn(int set, const char *fmt, ...)
|
paxwarn(int set, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
char buf[8192];
|
||||||
|
|
||||||
va_start(ap, fmt);
|
|
||||||
if (set)
|
if (set)
|
||||||
exit_val = 1;
|
exit_val = 1;
|
||||||
/*
|
/*
|
||||||
@ -146,8 +146,10 @@ paxwarn(int set, const char *fmt, ...)
|
|||||||
vfpart = 0;
|
vfpart = 0;
|
||||||
}
|
}
|
||||||
(void)fprintf(stderr, "%s: ", argv0);
|
(void)fprintf(stderr, "%s: ", argv0);
|
||||||
(void)vfprintf(stderr, fmt, ap);
|
va_start(ap, fmt);
|
||||||
|
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
safe_print(buf, stderr);
|
||||||
(void)fputc('\n', stderr);
|
(void)fputc('\n', stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,8 +163,8 @@ void
|
|||||||
syswarn(int set, int errnum, const char *fmt, ...)
|
syswarn(int set, int errnum, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
char buf[8192];
|
||||||
|
|
||||||
va_start(ap, fmt);
|
|
||||||
if (set)
|
if (set)
|
||||||
exit_val = 1;
|
exit_val = 1;
|
||||||
/*
|
/*
|
||||||
@ -175,8 +177,10 @@ syswarn(int set, int errnum, const char *fmt, ...)
|
|||||||
vfpart = 0;
|
vfpart = 0;
|
||||||
}
|
}
|
||||||
(void)fprintf(stderr, "%s: ", argv0);
|
(void)fprintf(stderr, "%s: ", argv0);
|
||||||
(void)vfprintf(stderr, fmt, ap);
|
va_start(ap, fmt);
|
||||||
|
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
safe_print(buf, stderr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* format and print the errno
|
* format and print the errno
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: posix_spawn.3,v 1.10 2023/06/26 06:58:18 jmc Exp $
|
.\" $OpenBSD: posix_spawn.3,v 1.11 2023/06/26 15:28:52 tb Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2012 Marc Espie <espie@openbsd.org>
|
.\" Copyright (c) 2012 Marc Espie <espie@openbsd.org>
|
||||||
.\"
|
.\"
|
||||||
@ -132,4 +132,4 @@ These functions were ported from
|
|||||||
to
|
to
|
||||||
.Ox 5.2 .
|
.Ox 5.2 .
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An \&Ed Shouten Aq Mt ed@FreeBSD.org
|
.An \&Ed Schouten Aq Mt ed@FreeBSD.org
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ec_asn1.c,v 1.45 2023/05/04 05:59:38 tb Exp $ */
|
/* $OpenBSD: ec_asn1.c,v 1.46 2023/06/27 07:28:57 tb Exp $ */
|
||||||
/*
|
/*
|
||||||
* Written by Nils Larsch for the OpenSSL project.
|
* Written by Nils Larsch for the OpenSSL project.
|
||||||
*/
|
*/
|
||||||
@ -70,23 +70,7 @@
|
|||||||
int
|
int
|
||||||
EC_GROUP_get_basis_type(const EC_GROUP *group)
|
EC_GROUP_get_basis_type(const EC_GROUP *group)
|
||||||
{
|
{
|
||||||
int i = 0;
|
return 0;
|
||||||
|
|
||||||
if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
|
|
||||||
NID_X9_62_characteristic_two_field)
|
|
||||||
/* everything else is currently not supported */
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
while (group->poly[i] != 0)
|
|
||||||
i++;
|
|
||||||
|
|
||||||
if (i == 4)
|
|
||||||
return NID_X9_62_ppBasis;
|
|
||||||
else if (i == 2)
|
|
||||||
return NID_X9_62_tpBasis;
|
|
||||||
else
|
|
||||||
/* everything else is currently not supported */
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* some structures needed for the asn1 encoding */
|
/* some structures needed for the asn1 encoding */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ec_local.h,v 1.21 2023/06/25 19:22:21 tb Exp $ */
|
/* $OpenBSD: ec_local.h,v 1.22 2023/06/27 07:31:18 tb Exp $ */
|
||||||
/*
|
/*
|
||||||
* Originally written by Bodo Moeller for the OpenSSL project.
|
* Originally written by Bodo Moeller for the OpenSSL project.
|
||||||
*/
|
*/
|
||||||
@ -205,22 +205,9 @@ struct ec_group_st {
|
|||||||
*/
|
*/
|
||||||
BIGNUM field;
|
BIGNUM field;
|
||||||
|
|
||||||
/*
|
|
||||||
* Field specification for GF(2^m). The irreducible polynomial is
|
|
||||||
* f(t) = t^poly[0] + t^poly[1] + ... + t^poly[k],
|
|
||||||
* where
|
|
||||||
* m = poly[0] > poly[1] > ... > poly[k] = 0,
|
|
||||||
* and the array is terminated with poly[k+1] = -1. All elliptic curve
|
|
||||||
* irreducibles have at most 5 non-zero terms.
|
|
||||||
*/
|
|
||||||
int poly[6];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Curve coefficients. In characteristic > 3, the curve is defined by a
|
* Curve coefficients. In characteristic > 3, the curve is defined by a
|
||||||
* Weierstrass equation of the form
|
* Weierstrass equation of the form y^2 = x^3 + a*x + b.
|
||||||
* y^2 = x^3 + a*x + b.
|
|
||||||
* For characteristic 2, the curve is defined by an equation of the form
|
|
||||||
* y^2 + x*y = x^3 + a*x^2 + b.
|
|
||||||
*/
|
*/
|
||||||
BIGNUM a, b;
|
BIGNUM a, b;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: eck_prn.c,v 1.20 2022/11/19 07:29:29 tb Exp $ */
|
/* $OpenBSD: eck_prn.c,v 1.21 2023/06/27 07:32:29 tb Exp $ */
|
||||||
/*
|
/*
|
||||||
* Written by Nils Larsch for the OpenSSL project.
|
* Written by Nils Larsch for the OpenSSL project.
|
||||||
*/
|
*/
|
||||||
@ -163,6 +163,7 @@ ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
|
|||||||
unsigned char *buffer = NULL;
|
unsigned char *buffer = NULL;
|
||||||
size_t buf_len = 0, i;
|
size_t buf_len = 0, i;
|
||||||
int ret = 0, reason = ERR_R_BIO_LIB;
|
int ret = 0, reason = ERR_R_BIO_LIB;
|
||||||
|
int nid;
|
||||||
BN_CTX *ctx = NULL;
|
BN_CTX *ctx = NULL;
|
||||||
const EC_POINT *point = NULL;
|
const EC_POINT *point = NULL;
|
||||||
BIGNUM *p = NULL, *a = NULL, *b = NULL, *gen = NULL, *order = NULL,
|
BIGNUM *p = NULL, *a = NULL, *b = NULL, *gen = NULL, *order = NULL,
|
||||||
@ -186,8 +187,6 @@ ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
|
|||||||
}
|
}
|
||||||
if (EC_GROUP_get_asn1_flag(x)) {
|
if (EC_GROUP_get_asn1_flag(x)) {
|
||||||
/* the curve parameter are given by an asn1 OID */
|
/* the curve parameter are given by an asn1 OID */
|
||||||
int nid;
|
|
||||||
|
|
||||||
if (!BIO_indent(bp, off, 128))
|
if (!BIO_indent(bp, off, 128))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
@ -209,12 +208,7 @@ ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* explicit parameters */
|
/* explicit parameters */
|
||||||
int is_char_two = 0;
|
|
||||||
point_conversion_form_t form;
|
point_conversion_form_t form;
|
||||||
int tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(x));
|
|
||||||
|
|
||||||
if (tmp_nid == NID_X9_62_characteristic_two_field)
|
|
||||||
is_char_two = 1;
|
|
||||||
|
|
||||||
if ((p = BN_new()) == NULL || (a = BN_new()) == NULL ||
|
if ((p = BN_new()) == NULL || (a = BN_new()) == NULL ||
|
||||||
(b = BN_new()) == NULL || (order = BN_new()) == NULL ||
|
(b = BN_new()) == NULL || (order = BN_new()) == NULL ||
|
||||||
@ -266,32 +260,13 @@ ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
|
|||||||
if (!BIO_indent(bp, off, 128))
|
if (!BIO_indent(bp, off, 128))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
nid = EC_METHOD_get_field_type(EC_GROUP_method_of(x));
|
||||||
/* print the 'short name' of the field type */
|
/* print the 'short name' of the field type */
|
||||||
if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(tmp_nid))
|
if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(nid)) <= 0)
|
||||||
<= 0)
|
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (is_char_two) {
|
if ((p != NULL) && !ASN1_bn_print(bp, "Prime:", p, buffer, off))
|
||||||
/* print the 'short name' of the base type OID */
|
goto err;
|
||||||
int basis_type = EC_GROUP_get_basis_type(x);
|
|
||||||
if (basis_type == 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (!BIO_indent(bp, off, 128))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (BIO_printf(bp, "Basis Type: %s\n",
|
|
||||||
OBJ_nid2sn(basis_type)) <= 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
/* print the polynomial */
|
|
||||||
if ((p != NULL) && !ASN1_bn_print(bp, "Polynomial:", p, buffer,
|
|
||||||
off))
|
|
||||||
goto err;
|
|
||||||
} else {
|
|
||||||
if ((p != NULL) && !ASN1_bn_print(bp, "Prime:", p, buffer, off))
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if ((a != NULL) && !ASN1_bn_print(bp, "A: ", a, buffer, off))
|
if ((a != NULL) && !ASN1_bn_print(bp, "A: ", a, buffer, off))
|
||||||
goto err;
|
goto err;
|
||||||
if ((b != NULL) && !ASN1_bn_print(bp, "B: ", b, buffer, off))
|
if ((b != NULL) && !ASN1_bn_print(bp, "B: ", b, buffer, off))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ssl_kex.c,v 1.10 2022/01/14 09:11:22 tb Exp $ */
|
/* $OpenBSD: ssl_kex.c,v 1.11 2023/06/27 11:03:41 tb Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org>
|
* Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -63,17 +63,17 @@ ssl_kex_generate_dhe_params_auto(DH *dh, size_t key_bits)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (key_bits >= 8192)
|
if (key_bits >= 8192)
|
||||||
p = get_rfc3526_prime_8192(NULL);
|
p = BN_get_rfc3526_prime_8192(NULL);
|
||||||
else if (key_bits >= 4096)
|
else if (key_bits >= 4096)
|
||||||
p = get_rfc3526_prime_4096(NULL);
|
p = BN_get_rfc3526_prime_4096(NULL);
|
||||||
else if (key_bits >= 3072)
|
else if (key_bits >= 3072)
|
||||||
p = get_rfc3526_prime_3072(NULL);
|
p = BN_get_rfc3526_prime_3072(NULL);
|
||||||
else if (key_bits >= 2048)
|
else if (key_bits >= 2048)
|
||||||
p = get_rfc3526_prime_2048(NULL);
|
p = BN_get_rfc3526_prime_2048(NULL);
|
||||||
else if (key_bits >= 1536)
|
else if (key_bits >= 1536)
|
||||||
p = get_rfc3526_prime_1536(NULL);
|
p = BN_get_rfc3526_prime_1536(NULL);
|
||||||
else
|
else
|
||||||
p = get_rfc2409_prime_1024(NULL);
|
p = BN_get_rfc2409_prime_1024(NULL);
|
||||||
|
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: xonly.c,v 1.1 2023/01/18 19:18:49 anton Exp $ */
|
/* $OpenBSD: xonly.c,v 1.2 2023/06/26 19:03:03 guenther Exp $ */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
@ -26,6 +26,8 @@ void *setup_mmap_nrx(void);
|
|||||||
void *setup_mmap_nwx(void);
|
void *setup_mmap_nwx(void);
|
||||||
void *setup_mmap_xnwx(void);
|
void *setup_mmap_xnwx(void);
|
||||||
|
|
||||||
|
char ***_csu_finish(char **_argv, char **_envp, void (*_cleanup)(void));
|
||||||
|
|
||||||
struct outcome {
|
struct outcome {
|
||||||
int uu;
|
int uu;
|
||||||
int ku;
|
int ku;
|
||||||
@ -46,11 +48,11 @@ struct readable {
|
|||||||
{ "mmap nwx", setup_mmap_nwx, 0, NULL, 0, {} },
|
{ "mmap nwx", setup_mmap_nwx, 0, NULL, 0, {} },
|
||||||
{ "mmap xnwx", setup_mmap_xnwx, 0, NULL, 0, {} },
|
{ "mmap xnwx", setup_mmap_xnwx, 0, NULL, 0, {} },
|
||||||
{ "main", NULL, 1, &main, 0, {} },
|
{ "main", NULL, 1, &main, 0, {} },
|
||||||
{ "libc", NULL, 1, &open, 0, {} },
|
{ "libc", NULL, 1, &_csu_finish, 0, {} },
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct outcome expectations[2][8] = {
|
static struct outcome expectations[2][8] = {
|
||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__) || defined(__amd64__)
|
||||||
[0] = {
|
[0] = {
|
||||||
/* ld.so */ { UNREADABLE, UNREADABLE },
|
/* ld.so */ { UNREADABLE, UNREADABLE },
|
||||||
/* mmap xz */ { UNREADABLE, UNREADABLE },
|
/* mmap xz */ { UNREADABLE, UNREADABLE },
|
||||||
@ -61,20 +63,21 @@ static struct outcome expectations[2][8] = {
|
|||||||
/* main */ { UNREADABLE, UNREADABLE },
|
/* main */ { UNREADABLE, UNREADABLE },
|
||||||
/* libc */ { UNREADABLE, UNREADABLE },
|
/* libc */ { UNREADABLE, UNREADABLE },
|
||||||
},
|
},
|
||||||
#elif defined(__amd64__)
|
#else
|
||||||
|
#error "unknown architecture"
|
||||||
|
#endif
|
||||||
|
#if defined(__amd64__)
|
||||||
/* PKU not available. */
|
/* PKU not available. */
|
||||||
[0] = {
|
[1] = {
|
||||||
/* ld.so */ { READABLE, READABLE },
|
/* ld.so */ { READABLE, UNREADABLE },
|
||||||
/* mmap xz */ { UNREADABLE, UNREADABLE },
|
/* mmap xz */ { UNREADABLE, UNREADABLE },
|
||||||
/* mmap x */ { READABLE, READABLE },
|
/* mmap x */ { READABLE, READABLE },
|
||||||
/* mmap nrx */ { READABLE, READABLE },
|
/* mmap nrx */ { READABLE, READABLE },
|
||||||
/* mmap nwx */ { READABLE, READABLE },
|
/* mmap nwx */ { READABLE, READABLE },
|
||||||
/* mmap xnwx */ { READABLE, READABLE },
|
/* mmap xnwx */ { READABLE, READABLE },
|
||||||
/* main */ { READABLE, READABLE },
|
/* main */ { READABLE, UNREADABLE },
|
||||||
/* libc */ { READABLE, READABLE },
|
/* libc */ { READABLE, UNREADABLE },
|
||||||
},
|
},
|
||||||
#else
|
|
||||||
#error "unknown architecture"
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -186,6 +189,17 @@ main(void)
|
|||||||
size_t i;
|
size_t i;
|
||||||
int p[2];
|
int p[2];
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
const struct outcome *desires = expectations[0];
|
||||||
|
|
||||||
|
#if defined(__amd64__)
|
||||||
|
{
|
||||||
|
uint32_t ebx, ecx, edx;
|
||||||
|
asm("cpuid" : "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (7), "c" (0));
|
||||||
|
if ((ecx & 8) == 0) /* SEFF0ECX_PKU */
|
||||||
|
desires = expectations[1];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
signal(SIGSEGV, sigsegv);
|
signal(SIGSEGV, sigsegv);
|
||||||
signal(SIGBUS, sigsegv);
|
signal(SIGBUS, sigsegv);
|
||||||
@ -222,7 +236,7 @@ main(void)
|
|||||||
printf("%-16s %18p %-12s %-12s\n", r->name, r->addr,
|
printf("%-16s %18p %-12s %-12s\n", r->name, r->addr,
|
||||||
"skipped", "skipped");
|
"skipped", "skipped");
|
||||||
} else {
|
} else {
|
||||||
const struct outcome *want = &expectations[0][i];
|
const struct outcome *want = &desires[i];
|
||||||
|
|
||||||
if (r->got.uu != want->uu || r->got.ku != want->ku)
|
if (r->got.uu != want->uu || r->got.ku != want->ku)
|
||||||
error++;
|
error++;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
regress/usr.sbin/rpki-client/aspa/AS1000.asa
Normal file
BIN
regress/usr.sbin/rpki-client/aspa/AS1000.asa
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: profile.h,v 1.5 2021/09/04 22:15:33 bluhm Exp $ */
|
/* $OpenBSD: profile.h,v 1.6 2023/06/27 10:11:15 cheloha Exp $ */
|
||||||
/* $NetBSD: profile.h,v 1.3 2003/11/28 23:22:45 fvdl Exp $ */
|
/* $NetBSD: profile.h,v 1.3 2003/11/28 23:22:45 fvdl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -72,6 +72,6 @@ __asm(" .globl __mcount \n" \
|
|||||||
|
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
#define MCOUNT_ENTER (void)&s; __asm__("cli");
|
#define MCOUNT_ENTER s = intr_disable()
|
||||||
#define MCOUNT_EXIT __asm__("sti");
|
#define MCOUNT_EXIT intr_restore(s)
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_iwx.c,v 1.172 2023/06/21 23:24:10 mlarkin Exp $ */
|
/* $OpenBSD: if_iwx.c,v 1.173 2023/06/27 15:31:27 stsp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
|
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
|
||||||
@ -10430,6 +10430,7 @@ static const struct pci_matchid iwx_devices[] = {
|
|||||||
/* _14 is an MA device, not yet supported */
|
/* _14 is an MA device, not yet supported */
|
||||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_15,},
|
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_15,},
|
||||||
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_16,},
|
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_16,},
|
||||||
|
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_17,},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -10520,6 +10521,8 @@ static const struct iwx_dev_info iwx_dev_info_table[] = {
|
|||||||
IWX_DEV_INFO(0x2725, 0x1674, iwx_2ax_cfg_ty_gf_a0), /* killer_1675x */
|
IWX_DEV_INFO(0x2725, 0x1674, iwx_2ax_cfg_ty_gf_a0), /* killer_1675x */
|
||||||
IWX_DEV_INFO(0x51f0, 0x1691, iwx_2ax_cfg_so_gf4_a0), /* killer_1690s */
|
IWX_DEV_INFO(0x51f0, 0x1691, iwx_2ax_cfg_so_gf4_a0), /* killer_1690s */
|
||||||
IWX_DEV_INFO(0x51f0, 0x1692, iwx_2ax_cfg_so_gf4_a0), /* killer_1690i */
|
IWX_DEV_INFO(0x51f0, 0x1692, iwx_2ax_cfg_so_gf4_a0), /* killer_1690i */
|
||||||
|
IWX_DEV_INFO(0x51f1, 0x1691, iwx_2ax_cfg_so_gf4_a0),
|
||||||
|
IWX_DEV_INFO(0x51f1, 0x1692, iwx_2ax_cfg_so_gf4_a0),
|
||||||
IWX_DEV_INFO(0x54f0, 0x1691, iwx_2ax_cfg_so_gf4_a0), /* killer_1690s */
|
IWX_DEV_INFO(0x54f0, 0x1691, iwx_2ax_cfg_so_gf4_a0), /* killer_1690s */
|
||||||
IWX_DEV_INFO(0x54f0, 0x1692, iwx_2ax_cfg_so_gf4_a0), /* killer_1690i */
|
IWX_DEV_INFO(0x54f0, 0x1692, iwx_2ax_cfg_so_gf4_a0), /* killer_1690i */
|
||||||
IWX_DEV_INFO(0x7a70, 0x0090, iwx_2ax_cfg_so_gf_a0_long),
|
IWX_DEV_INFO(0x7a70, 0x0090, iwx_2ax_cfg_so_gf_a0_long),
|
||||||
@ -11122,7 +11125,6 @@ iwx_attach(struct device *parent, struct device *self, void *aux)
|
|||||||
case PCI_PRODUCT_INTEL_WL_22500_9:
|
case PCI_PRODUCT_INTEL_WL_22500_9:
|
||||||
case PCI_PRODUCT_INTEL_WL_22500_10:
|
case PCI_PRODUCT_INTEL_WL_22500_10:
|
||||||
case PCI_PRODUCT_INTEL_WL_22500_11:
|
case PCI_PRODUCT_INTEL_WL_22500_11:
|
||||||
case PCI_PRODUCT_INTEL_WL_22500_12:
|
|
||||||
case PCI_PRODUCT_INTEL_WL_22500_13:
|
case PCI_PRODUCT_INTEL_WL_22500_13:
|
||||||
/* _14 is an MA device, not yet supported */
|
/* _14 is an MA device, not yet supported */
|
||||||
case PCI_PRODUCT_INTEL_WL_22500_15:
|
case PCI_PRODUCT_INTEL_WL_22500_15:
|
||||||
@ -11137,6 +11139,19 @@ iwx_attach(struct device *parent, struct device *self, void *aux)
|
|||||||
sc->sc_tx_with_siso_diversity = 0;
|
sc->sc_tx_with_siso_diversity = 0;
|
||||||
sc->sc_uhb_supported = 1;
|
sc->sc_uhb_supported = 1;
|
||||||
break;
|
break;
|
||||||
|
case PCI_PRODUCT_INTEL_WL_22500_12:
|
||||||
|
case PCI_PRODUCT_INTEL_WL_22500_17:
|
||||||
|
sc->sc_fwname = IWX_SO_A_GF_A_FW;
|
||||||
|
sc->sc_pnvm_name = IWX_SO_A_GF_A_PNVM;
|
||||||
|
sc->sc_device_family = IWX_DEVICE_FAMILY_AX210;
|
||||||
|
sc->sc_integrated = 1;
|
||||||
|
sc->sc_ltr_delay = IWX_SOC_FLAGS_LTR_APPLY_DELAY_2500;
|
||||||
|
sc->sc_low_latency_xtal = 1;
|
||||||
|
sc->sc_xtal_latency = 12000;
|
||||||
|
sc->sc_tx_with_siso_diversity = 0;
|
||||||
|
sc->sc_uhb_supported = 0;
|
||||||
|
sc->sc_imr_enabled = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf("%s: unknown adapter type\n", DEVNAME(sc));
|
printf("%s: unknown adapter type\n", DEVNAME(sc));
|
||||||
return;
|
return;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$OpenBSD: pcidevs,v 1.2039 2023/06/13 02:43:39 jcs Exp $
|
$OpenBSD: pcidevs,v 1.2040 2023/06/27 15:30:25 stsp Exp $
|
||||||
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -5875,6 +5875,7 @@ product INTEL 600SERIES_LP_XHCI 0x51ed 600 Series xHCI
|
|||||||
product INTEL 600SERIES_LP_XDCI 0x51ee 600 Series xDCI
|
product INTEL 600SERIES_LP_XDCI 0x51ee 600 Series xDCI
|
||||||
product INTEL 600SERIES_LP_SRAM 0x51ef 600 Series SRAM
|
product INTEL 600SERIES_LP_SRAM 0x51ef 600 Series SRAM
|
||||||
product INTEL WL_22500_11 0x51f0 Wi-Fi 6 AX211
|
product INTEL WL_22500_11 0x51f0 Wi-Fi 6 AX211
|
||||||
|
product INTEL WL_22500_17 0x51f1 Wi-Fi 6 AX211
|
||||||
product INTEL 600SERIES_LP_GSPI_2 0x51fb 600 Series GSPI
|
product INTEL 600SERIES_LP_GSPI_2 0x51fb 600 Series GSPI
|
||||||
product INTEL 600SERIES_LP_ISH 0x51fc 600 Series ISH
|
product INTEL 600SERIES_LP_ISH 0x51fc 600 Series ISH
|
||||||
product INTEL 600SERIES_LP_UFS 0x51ff 600 Series UFS
|
product INTEL 600SERIES_LP_UFS 0x51ff 600 Series UFS
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||||
*
|
*
|
||||||
* generated from:
|
* generated from:
|
||||||
* OpenBSD: pcidevs,v 1.2039 2023/06/13 02:43:39 jcs Exp
|
* OpenBSD: pcidevs,v 1.2040 2023/06/27 15:30:25 stsp Exp
|
||||||
*/
|
*/
|
||||||
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
||||||
|
|
||||||
@ -5880,6 +5880,7 @@
|
|||||||
#define PCI_PRODUCT_INTEL_600SERIES_LP_XDCI 0x51ee /* 600 Series xDCI */
|
#define PCI_PRODUCT_INTEL_600SERIES_LP_XDCI 0x51ee /* 600 Series xDCI */
|
||||||
#define PCI_PRODUCT_INTEL_600SERIES_LP_SRAM 0x51ef /* 600 Series SRAM */
|
#define PCI_PRODUCT_INTEL_600SERIES_LP_SRAM 0x51ef /* 600 Series SRAM */
|
||||||
#define PCI_PRODUCT_INTEL_WL_22500_11 0x51f0 /* Wi-Fi 6 AX211 */
|
#define PCI_PRODUCT_INTEL_WL_22500_11 0x51f0 /* Wi-Fi 6 AX211 */
|
||||||
|
#define PCI_PRODUCT_INTEL_WL_22500_17 0x51f1 /* Wi-Fi 6 AX211 */
|
||||||
#define PCI_PRODUCT_INTEL_600SERIES_LP_GSPI_2 0x51fb /* 600 Series GSPI */
|
#define PCI_PRODUCT_INTEL_600SERIES_LP_GSPI_2 0x51fb /* 600 Series GSPI */
|
||||||
#define PCI_PRODUCT_INTEL_600SERIES_LP_ISH 0x51fc /* 600 Series ISH */
|
#define PCI_PRODUCT_INTEL_600SERIES_LP_ISH 0x51fc /* 600 Series ISH */
|
||||||
#define PCI_PRODUCT_INTEL_600SERIES_LP_UFS 0x51ff /* 600 Series UFS */
|
#define PCI_PRODUCT_INTEL_600SERIES_LP_UFS 0x51ff /* 600 Series UFS */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||||
*
|
*
|
||||||
* generated from:
|
* generated from:
|
||||||
* OpenBSD: pcidevs,v 1.2039 2023/06/13 02:43:39 jcs Exp
|
* OpenBSD: pcidevs,v 1.2040 2023/06/27 15:30:25 stsp Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
|
||||||
@ -20875,6 +20875,10 @@ static const struct pci_known_product pci_known_products[] = {
|
|||||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_11,
|
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_11,
|
||||||
"Wi-Fi 6 AX211",
|
"Wi-Fi 6 AX211",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_17,
|
||||||
|
"Wi-Fi 6 AX211",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_600SERIES_LP_GSPI_2,
|
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_600SERIES_LP_GSPI_2,
|
||||||
"600 Series GSPI",
|
"600 Series GSPI",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: uaudio.c,v 1.172 2022/10/26 20:19:09 kn Exp $ */
|
/* $OpenBSD: uaudio.c,v 1.173 2023/06/27 09:28:08 ratchov Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org>
|
* Copyright (c) 2018 Alexandre Ratchov <alex@caoua.org>
|
||||||
*
|
*
|
||||||
@ -2216,7 +2216,7 @@ uaudio_process_ac(struct uaudio_softc *sc, struct uaudio_blob *p, int ifnum)
|
|||||||
&u->rates)) {
|
&u->rates)) {
|
||||||
printf("%s: failed to read clock rates\n",
|
printf("%s: failed to read clock rates\n",
|
||||||
DEVNAME(sc));
|
DEVNAME(sc));
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
#ifdef UAUDIO_DEBUG
|
#ifdef UAUDIO_DEBUG
|
||||||
if (uaudio_debug) {
|
if (uaudio_debug) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kern_timeout.c,v 1.90 2022/12/31 16:06:24 cheloha Exp $ */
|
/* $OpenBSD: kern_timeout.c,v 1.91 2023/06/26 16:26:20 cheloha Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
|
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
|
||||||
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
|
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
|
||||||
@ -542,13 +542,11 @@ timeout_hardclock_update(void)
|
|||||||
{
|
{
|
||||||
struct timespec elapsed, now;
|
struct timespec elapsed, now;
|
||||||
struct kclock *kc;
|
struct kclock *kc;
|
||||||
struct timespec *lastscan;
|
struct timespec *lastscan = &timeout_kclock[KCLOCK_UPTIME].kc_lastscan;
|
||||||
int b, done, first, i, last, level, need_softclock, off;
|
int b, done, first, i, last, level, need_softclock = 1, off;
|
||||||
|
|
||||||
nanouptime(&now);
|
nanouptime(&now);
|
||||||
lastscan = &timeout_kclock[KCLOCK_UPTIME].kc_lastscan;
|
|
||||||
timespecsub(&now, lastscan, &elapsed);
|
timespecsub(&now, lastscan, &elapsed);
|
||||||
need_softclock = 1;
|
|
||||||
|
|
||||||
mtx_enter(&timeout_mutex);
|
mtx_enter(&timeout_mutex);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: bt.5,v 1.14 2022/03/31 17:27:29 naddy Exp $
|
.\" $OpenBSD: bt.5,v 1.15 2023/06/27 14:13:33 claudio Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2019 Martin Pieuchot <mpi@openbsd.org>
|
.\" Copyright (c) 2019 Martin Pieuchot <mpi@openbsd.org>
|
||||||
.\"
|
.\"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: March 31 2022 $
|
.Dd $Mdocdate: June 27 2023 $
|
||||||
.Dt BT 5
|
.Dt BT 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -111,8 +111,8 @@ Full name of the probe.
|
|||||||
Return value of the traced syscall.
|
Return value of the traced syscall.
|
||||||
.It Va tid
|
.It Va tid
|
||||||
Thread ID of the current thread.
|
Thread ID of the current thread.
|
||||||
.\".It Va ustack
|
.It Va ustack
|
||||||
.\"Userland stack of the current thread.
|
Userland stack of the current thread.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Functions:
|
Functions:
|
||||||
@ -141,10 +141,6 @@ and
|
|||||||
with buckets of
|
with buckets of
|
||||||
.Va step
|
.Va step
|
||||||
size.
|
size.
|
||||||
.It Fn max
|
|
||||||
Returns the maximum recorded value.
|
|
||||||
.It Fn min
|
|
||||||
Returns the minimum recorded value.
|
|
||||||
.It Fn print "@map"
|
.It Fn print "@map"
|
||||||
Print all pairs from
|
Print all pairs from
|
||||||
.Va @map .
|
.Va @map .
|
||||||
@ -162,8 +158,6 @@ Return the string from argument
|
|||||||
truncated to
|
truncated to
|
||||||
.Va index
|
.Va index
|
||||||
characters (up to 64, the default) including a guaranteed NUL-terminator.
|
characters (up to 64, the default) including a guaranteed NUL-terminator.
|
||||||
.It Fn sum
|
|
||||||
Returns the sum of all recorded values.
|
|
||||||
.It Fn time timefmt
|
.It Fn time timefmt
|
||||||
Print timestamps using
|
Print timestamps using
|
||||||
.Xr strftime 3 .
|
.Xr strftime 3 .
|
||||||
@ -172,6 +166,23 @@ Set all values from
|
|||||||
.Va @map
|
.Va @map
|
||||||
to 0.
|
to 0.
|
||||||
.El
|
.El
|
||||||
|
.Pp
|
||||||
|
The following functions only work on a sepcific map entry.
|
||||||
|
.Bl -tag -width "lhist(value, min, max, step)"
|
||||||
|
.It "@map[key]" = Fn count
|
||||||
|
Increase the stored value for
|
||||||
|
.Va key
|
||||||
|
by one.
|
||||||
|
.It "@map[key]" = Fn max "value"
|
||||||
|
Store the maximum recorded value for
|
||||||
|
.Va key .
|
||||||
|
.It "@map[key]" = Fn min "value"
|
||||||
|
Store the minimum recorded value for
|
||||||
|
.Va key .
|
||||||
|
.It "@map[key]" = Fn sum "value"
|
||||||
|
Store the sum of all recorded values for
|
||||||
|
.Va key .
|
||||||
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr awk 1 ,
|
.Xr awk 1 ,
|
||||||
.Xr dt 4 ,
|
.Xr dt 4 ,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: btrace.c,v 1.70 2023/05/12 14:14:16 claudio Exp $ */
|
/* $OpenBSD: btrace.c,v 1.71 2023/06/27 14:17:00 claudio Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 - 2021 Martin Pieuchot <mpi@openbsd.org>
|
* Copyright (c) 2019 - 2021 Martin Pieuchot <mpi@openbsd.org>
|
||||||
@ -450,6 +450,37 @@ rules_do(int fd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t
|
||||||
|
rules_action_scan(struct bt_stmt *bs)
|
||||||
|
{
|
||||||
|
struct bt_arg *ba;
|
||||||
|
uint64_t evtflags = 0;
|
||||||
|
|
||||||
|
while (bs != NULL) {
|
||||||
|
SLIST_FOREACH(ba, &bs->bs_args, ba_next)
|
||||||
|
evtflags |= ba2dtflags(ba);
|
||||||
|
|
||||||
|
/* Also check the value for map/hist insertion */
|
||||||
|
switch (bs->bs_act) {
|
||||||
|
case B_AC_BUCKETIZE:
|
||||||
|
case B_AC_INSERT:
|
||||||
|
ba = (struct bt_arg *)bs->bs_var;
|
||||||
|
evtflags |= ba2dtflags(ba);
|
||||||
|
break;
|
||||||
|
case B_AC_TEST:
|
||||||
|
evtflags |= rules_action_scan(
|
||||||
|
(struct bt_stmt *)bs->bs_var);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
bs = SLIST_NEXT(bs, bs_next);
|
||||||
|
}
|
||||||
|
|
||||||
|
return evtflags;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rules_setup(int fd)
|
rules_setup(int fd)
|
||||||
{
|
{
|
||||||
@ -474,21 +505,7 @@ rules_setup(int fd)
|
|||||||
evtflags |= ba2dtflags(ba);
|
evtflags |= ba2dtflags(ba);
|
||||||
}
|
}
|
||||||
|
|
||||||
SLIST_FOREACH(bs, &r->br_action, bs_next) {
|
evtflags |= rules_action_scan(SLIST_FIRST(&r->br_action));
|
||||||
SLIST_FOREACH(ba, &bs->bs_args, ba_next)
|
|
||||||
evtflags |= ba2dtflags(ba);
|
|
||||||
|
|
||||||
/* Also check the value for map/hist insertion */
|
|
||||||
switch (bs->bs_act) {
|
|
||||||
case B_AC_BUCKETIZE:
|
|
||||||
case B_AC_INSERT:
|
|
||||||
ba = (struct bt_arg *)bs->bs_var;
|
|
||||||
evtflags |= ba2dtflags(ba);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SLIST_FOREACH(bp, &r->br_probes, bp_next) {
|
SLIST_FOREACH(bp, &r->br_probes, bp_next) {
|
||||||
debug("parsed probe '%s'", debug_probe_name(bp));
|
debug("parsed probe '%s'", debug_probe_name(bp));
|
||||||
@ -1685,10 +1702,17 @@ ba2dtflags(struct bt_arg *ba)
|
|||||||
long
|
long
|
||||||
bacmp(struct bt_arg *a, struct bt_arg *b)
|
bacmp(struct bt_arg *a, struct bt_arg *b)
|
||||||
{
|
{
|
||||||
assert(a->ba_type == b->ba_type);
|
if (a->ba_type != b->ba_type)
|
||||||
assert(a->ba_type == B_AT_LONG);
|
return a->ba_type - b->ba_type;
|
||||||
|
|
||||||
return ba2long(a, NULL) - ba2long(b, NULL);
|
switch (a->ba_type) {
|
||||||
|
case B_AT_LONG:
|
||||||
|
return ba2long(a, NULL) - ba2long(b, NULL);
|
||||||
|
case B_AT_STR:
|
||||||
|
return strcmp(ba2str(a, NULL), ba2str(b, NULL));
|
||||||
|
default:
|
||||||
|
errx(1, "no compare support for type %d", a->ba_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__dead void
|
__dead void
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: map.c,v 1.20 2022/04/30 01:29:05 tedu Exp $ */
|
/* $OpenBSD: map.c,v 1.21 2023/06/27 14:17:00 claudio Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 Martin Pieuchot <mpi@openbsd.org>
|
* Copyright (c) 2020 Martin Pieuchot <mpi@openbsd.org>
|
||||||
@ -176,6 +176,11 @@ map_insert(struct map *map, const char *key, struct bt_arg *bval,
|
|||||||
val += ba2long(bval->ba_value, dtev);
|
val += ba2long(bval->ba_value, dtev);
|
||||||
mep->mval->ba_value = (void *)val;
|
mep->mval->ba_value = (void *)val;
|
||||||
break;
|
break;
|
||||||
|
case B_AT_BI_KSTACK:
|
||||||
|
case B_AT_BI_USTACK:
|
||||||
|
free(mep->mval);
|
||||||
|
mep->mval = ba_new(ba2str(bval, dtev), B_AT_STR);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
errx(1, "no insert support for type %d", bval->ba_type);
|
errx(1, "no insert support for type %d", bval->ba_type);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/perl
|
#! /usr/bin/perl
|
||||||
|
|
||||||
# ex:ts=8 sw=4:
|
# ex:ts=8 sw=4:
|
||||||
# $OpenBSD: PkgAdd.pm,v 1.141 2023/06/13 09:07:17 espie Exp $
|
# $OpenBSD: PkgAdd.pm,v 1.142 2023/06/27 11:11:46 espie Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
|
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
|
||||||
#
|
#
|
||||||
@ -906,12 +906,7 @@ sub newer_is_bad_arch($set, $state)
|
|||||||
|
|
||||||
sub may_tie_files($set, $state)
|
sub may_tie_files($set, $state)
|
||||||
{
|
{
|
||||||
<<<<<<< PkgAdd.pm
|
|
||||||
my ($set, $state) = @_;
|
|
||||||
if ($set->newer > 0 && $set->older_to_do > 0 &&
|
if ($set->newer > 0 && $set->older_to_do > 0 &&
|
||||||
=======
|
|
||||||
if ($set->newer > 0 && $set->older_to_do > 0 &&
|
|
||||||
>>>>>>> 1.141
|
|
||||||
!$state->defines('donttie')) {
|
!$state->defines('donttie')) {
|
||||||
my $sha = {};
|
my $sha = {};
|
||||||
|
|
||||||
@ -1186,7 +1181,6 @@ sub process_parameters($self, $state)
|
|||||||
|
|
||||||
if (@ARGV == 0) {
|
if (@ARGV == 0) {
|
||||||
@ARGV = sort(installed_packages());
|
@ARGV = sort(installed_packages());
|
||||||
$state->{allupdates} = 1;
|
|
||||||
}
|
}
|
||||||
my $inst = $state->repo->installed;
|
my $inst = $state->repo->installed;
|
||||||
for my $pkgname (@ARGV) {
|
for my $pkgname (@ARGV) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: aspa.c,v 1.18 2023/06/07 10:46:34 job Exp $ */
|
/* $OpenBSD: aspa.c,v 1.19 2023/06/26 18:39:53 job Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Job Snijders <job@fastly.com>
|
* Copyright (c) 2022 Job Snijders <job@fastly.com>
|
||||||
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
|
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
|
||||||
@ -46,33 +46,16 @@ extern ASN1_OBJECT *aspa_oid;
|
|||||||
* Types and templates for ASPA eContent draft-ietf-sidrops-aspa-profile-08
|
* Types and templates for ASPA eContent draft-ietf-sidrops-aspa-profile-08
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
ASN1_INTEGER *providerASID;
|
|
||||||
ASN1_OCTET_STRING *afiLimit;
|
|
||||||
} ProviderAS;
|
|
||||||
|
|
||||||
DECLARE_STACK_OF(ProviderAS);
|
|
||||||
|
|
||||||
#ifndef DEFINE_STACK_OF
|
|
||||||
#define sk_ProviderAS_num(sk) SKM_sk_num(ProviderAS, (sk))
|
|
||||||
#define sk_ProviderAS_value(sk, i) SKM_sk_value(ProviderAS, (sk), (i))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ASN1_SEQUENCE(ProviderAS) = {
|
|
||||||
ASN1_SIMPLE(ProviderAS, providerASID, ASN1_INTEGER),
|
|
||||||
ASN1_OPT(ProviderAS, afiLimit, ASN1_OCTET_STRING),
|
|
||||||
} ASN1_SEQUENCE_END(ProviderAS);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ASN1_INTEGER *version;
|
ASN1_INTEGER *version;
|
||||||
ASN1_INTEGER *customerASID;
|
ASN1_INTEGER *customerASID;
|
||||||
STACK_OF(ProviderAS) *providers;
|
STACK_OF(ASN1_INTEGER) *providers;
|
||||||
} ASProviderAttestation;
|
} ASProviderAttestation;
|
||||||
|
|
||||||
ASN1_SEQUENCE(ASProviderAttestation) = {
|
ASN1_SEQUENCE(ASProviderAttestation) = {
|
||||||
ASN1_EXP_OPT(ASProviderAttestation, version, ASN1_INTEGER, 0),
|
ASN1_EXP_OPT(ASProviderAttestation, version, ASN1_INTEGER, 0),
|
||||||
ASN1_SIMPLE(ASProviderAttestation, customerASID, ASN1_INTEGER),
|
ASN1_SIMPLE(ASProviderAttestation, customerASID, ASN1_INTEGER),
|
||||||
ASN1_SEQUENCE_OF(ASProviderAttestation, providers, ProviderAS),
|
ASN1_SEQUENCE_OF(ASProviderAttestation, providers, ASN1_INTEGER),
|
||||||
} ASN1_SEQUENCE_END(ASProviderAttestation);
|
} ASN1_SEQUENCE_END(ASProviderAttestation);
|
||||||
|
|
||||||
DECLARE_ASN1_FUNCTIONS(ASProviderAttestation);
|
DECLARE_ASN1_FUNCTIONS(ASProviderAttestation);
|
||||||
@ -83,13 +66,13 @@ IMPLEMENT_ASN1_FUNCTIONS(ASProviderAttestation);
|
|||||||
* Return zero on failure, non-zero on success.
|
* Return zero on failure, non-zero on success.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
aspa_parse_providers(struct parse *p, const STACK_OF(ProviderAS) *providers)
|
aspa_parse_providers(struct parse *p, const STACK_OF(ASN1_INTEGER) *providers)
|
||||||
{
|
{
|
||||||
ProviderAS *pa;
|
const ASN1_INTEGER *pa;
|
||||||
struct aspa_provider provider;
|
uint32_t provider;
|
||||||
size_t providersz, i;
|
size_t providersz, i;
|
||||||
|
|
||||||
if ((providersz = sk_ProviderAS_num(providers)) == 0) {
|
if ((providersz = sk_ASN1_INTEGER_num(providers)) == 0) {
|
||||||
warnx("%s: ASPA: ProviderASSet needs at least one entry",
|
warnx("%s: ASPA: ProviderASSet needs at least one entry",
|
||||||
p->fn);
|
p->fn);
|
||||||
return 0;
|
return 0;
|
||||||
@ -106,39 +89,33 @@ aspa_parse_providers(struct parse *p, const STACK_OF(ProviderAS) *providers)
|
|||||||
err(1, NULL);
|
err(1, NULL);
|
||||||
|
|
||||||
for (i = 0; i < providersz; i++) {
|
for (i = 0; i < providersz; i++) {
|
||||||
pa = sk_ProviderAS_value(providers, i);
|
pa = sk_ASN1_INTEGER_value(providers, i);
|
||||||
|
|
||||||
memset(&provider, 0, sizeof(provider));
|
memset(&provider, 0, sizeof(provider));
|
||||||
|
|
||||||
if (!as_id_parse(pa->providerASID, &provider.as)) {
|
if (!as_id_parse(pa, &provider)) {
|
||||||
warnx("%s: ASPA: malformed ProviderAS", p->fn);
|
warnx("%s: ASPA: malformed ProviderAS", p->fn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->res->custasid == provider.as) {
|
if (p->res->custasid == provider) {
|
||||||
warnx("%s: ASPA: CustomerASID can't also be Provider",
|
warnx("%s: ASPA: CustomerASID can't also be Provider",
|
||||||
p->fn);
|
p->fn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
if (p->res->providers[i - 1].as > provider.as) {
|
if (p->res->providers[i - 1] > provider) {
|
||||||
warnx("%s: ASPA: invalid ProviderASSet order",
|
warnx("%s: ASPA: invalid ProviderASSet order",
|
||||||
p->fn);
|
p->fn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (p->res->providers[i - 1].as == provider.as) {
|
if (p->res->providers[i - 1] == provider) {
|
||||||
warnx("%s: ASPA: duplicate ProviderAS", p->fn);
|
warnx("%s: ASPA: duplicate ProviderAS", p->fn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pa->afiLimit != NULL && !ip_addr_afi_parse(p->fn,
|
|
||||||
pa->afiLimit, &provider.afi)) {
|
|
||||||
warnx("%s: ASPA: invalid afiLimit", p->fn);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->res->providers[p->res->providersz++] = provider;
|
p->res->providers[p->res->providersz++] = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +138,7 @@ aspa_parse_econtent(const unsigned char *d, size_t dsz, struct parse *p)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valid_econtent_version(p->fn, aspa->version, 0))
|
if (!valid_econtent_version(p->fn, aspa->version, 1))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!as_id_parse(aspa->customerASID, &p->res->custasid)) {
|
if (!as_id_parse(aspa->customerASID, &p->res->custasid)) {
|
||||||
@ -314,8 +291,7 @@ aspa_read(struct ibuf *b)
|
|||||||
io_read_buf(b, &p->expires, sizeof(p->expires));
|
io_read_buf(b, &p->expires, sizeof(p->expires));
|
||||||
|
|
||||||
io_read_buf(b, &p->providersz, sizeof(size_t));
|
io_read_buf(b, &p->providersz, sizeof(size_t));
|
||||||
if ((p->providers = calloc(p->providersz,
|
if ((p->providers = calloc(p->providersz, sizeof(uint32_t))) == NULL)
|
||||||
sizeof(struct aspa_provider))) == NULL)
|
|
||||||
err(1, NULL);
|
err(1, NULL);
|
||||||
io_read_buf(b, p->providers, p->providersz * sizeof(p->providers[0]));
|
io_read_buf(b, p->providers, p->providersz * sizeof(p->providers[0]));
|
||||||
|
|
||||||
@ -328,12 +304,12 @@ aspa_read(struct ibuf *b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert a new aspa_provider at index idx in the struct vap v.
|
* Insert a new uint32_t at index idx in the struct vap v.
|
||||||
* All elements in the provider array from idx are moved up by one
|
* All elements in the provider array from idx are moved up by one
|
||||||
* to make space for the new element.
|
* to make space for the new element.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
insert_vap(struct vap *v, uint32_t idx, struct aspa_provider *p)
|
insert_vap(struct vap *v, uint32_t idx, uint32_t *p)
|
||||||
{
|
{
|
||||||
if (idx < v->providersz)
|
if (idx < v->providersz)
|
||||||
memmove(v->providers + idx + 1, v->providers + idx,
|
memmove(v->providers + idx + 1, v->providers + idx,
|
||||||
@ -391,21 +367,15 @@ aspa_insert_vaps(struct vap_tree *tree, struct aspa *aspa, struct repo *rp)
|
|||||||
*/
|
*/
|
||||||
for (i = 0, j = 0; i < aspa->providersz; ) {
|
for (i = 0, j = 0; i < aspa->providersz; ) {
|
||||||
if (j == v->providersz ||
|
if (j == v->providersz ||
|
||||||
aspa->providers[i].as < v->providers[j].as) {
|
aspa->providers[i] < v->providers[j]) {
|
||||||
/* merge provider from aspa into v */
|
/* merge provider from aspa into v */
|
||||||
repo_stat_inc(rp, v->talid, RTYPE_ASPA,
|
repo_stat_inc(rp, v->talid, RTYPE_ASPA,
|
||||||
STYPE_BOTH + aspa->providers[i].afi);
|
STYPE_BOTH + aspa->providers[i]);
|
||||||
insert_vap(v, j, &aspa->providers[i]);
|
insert_vap(v, j, &aspa->providers[i]);
|
||||||
i++;
|
i++;
|
||||||
} else if (aspa->providers[i].as == v->providers[j].as) {
|
} else if (aspa->providers[i] == v->providers[j])
|
||||||
/* duplicate provider, merge afi */
|
|
||||||
if (v->providers[j].afi != aspa->providers[i].afi) {
|
|
||||||
repo_stat_inc(rp, v->talid, RTYPE_ASPA,
|
|
||||||
STYPE_BOTH + aspa->providers[i].afi);
|
|
||||||
v->providers[j].afi = 0;
|
|
||||||
}
|
|
||||||
i++;
|
i++;
|
||||||
}
|
|
||||||
if (j < v->providersz)
|
if (j < v->providersz)
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: extern.h,v 1.185 2023/06/23 11:36:24 claudio Exp $ */
|
/* $OpenBSD: extern.h,v 1.186 2023/06/26 18:39:53 job Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||||
*
|
*
|
||||||
@ -351,11 +351,6 @@ struct gbr {
|
|||||||
int talid; /* TAL the GBR is chained up to */
|
int talid; /* TAL the GBR is chained up to */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aspa_provider {
|
|
||||||
uint32_t as;
|
|
||||||
enum afi afi;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A single ASPA record
|
* A single ASPA record
|
||||||
*/
|
*/
|
||||||
@ -367,7 +362,7 @@ struct aspa {
|
|||||||
char *sia; /* SIA signedObject */
|
char *sia; /* SIA signedObject */
|
||||||
char *ski; /* SKI */
|
char *ski; /* SKI */
|
||||||
uint32_t custasid; /* the customerASID */
|
uint32_t custasid; /* the customerASID */
|
||||||
struct aspa_provider *providers; /* the providers */
|
uint32_t *providers; /* the providers */
|
||||||
size_t providersz; /* number of providers */
|
size_t providersz; /* number of providers */
|
||||||
time_t signtime; /* CMS signing-time attribute */
|
time_t signtime; /* CMS signing-time attribute */
|
||||||
time_t notbefore; /* EE cert's Not Before */
|
time_t notbefore; /* EE cert's Not Before */
|
||||||
@ -382,7 +377,7 @@ struct aspa {
|
|||||||
struct vap {
|
struct vap {
|
||||||
RB_ENTRY(vap) entry;
|
RB_ENTRY(vap) entry;
|
||||||
uint32_t custasid;
|
uint32_t custasid;
|
||||||
struct aspa_provider *providers;
|
uint32_t *providers;
|
||||||
size_t providersz;
|
size_t providersz;
|
||||||
time_t expires;
|
time_t expires;
|
||||||
int talid;
|
int talid;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: output-bgpd.c,v 1.27 2023/04/19 19:26:26 job Exp $ */
|
/* $OpenBSD: output-bgpd.c,v 1.28 2023/06/26 18:39:53 job Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||||
*
|
*
|
||||||
@ -63,18 +63,8 @@ output_bgpd(FILE *out, struct vrp_tree *vrps, struct brk_tree *brks,
|
|||||||
(long long)vap->expires) < 0)
|
(long long)vap->expires) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
for (i = 0; i < vap->providersz; i++) {
|
for (i = 0; i < vap->providersz; i++) {
|
||||||
if (fprintf(out, "%u", vap->providers[i].as) < 0)
|
if (fprintf(out, "%u", vap->providers[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
switch (vap->providers[i].afi) {
|
|
||||||
case AFI_IPV4:
|
|
||||||
if (fprintf(out, " inet") < 0)
|
|
||||||
return -1;
|
|
||||||
break;
|
|
||||||
case AFI_IPV6:
|
|
||||||
if (fprintf(out, " inet6") < 0)
|
|
||||||
return -1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (i + 1 < vap->providersz)
|
if (i + 1 < vap->providersz)
|
||||||
if (fprintf(out, ", ") < 0)
|
if (fprintf(out, ", ") < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: output-json.c,v 1.39 2023/06/05 14:19:13 claudio Exp $ */
|
/* $OpenBSD: output-json.c,v 1.40 2023/06/26 18:39:53 job Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
|
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -82,24 +82,18 @@ outputheader_json(struct stats *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_vap(struct vap *v, enum afi afi)
|
print_vap(struct vap *v)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
int found = 0;
|
|
||||||
|
|
||||||
json_do_object("aspa", 1);
|
json_do_object("aspa", 1);
|
||||||
json_do_int("customer_asid", v->custasid);
|
json_do_int("customer_asid", v->custasid);
|
||||||
json_do_int("expires", v->expires);
|
json_do_int("expires", v->expires);
|
||||||
|
|
||||||
json_do_array("providers");
|
json_do_array("providers");
|
||||||
for (i = 0; i < v->providersz; i++) {
|
for (i = 0; i < v->providersz; i++)
|
||||||
if (v->providers[i].afi != 0 && v->providers[i].afi != afi)
|
json_do_int("provider", v->providers[i]);
|
||||||
continue;
|
|
||||||
found = 1;
|
|
||||||
json_do_int("provider", v->providers[i].as);
|
|
||||||
}
|
|
||||||
if (!found)
|
|
||||||
json_do_int("provider", 0);
|
|
||||||
json_do_end();
|
json_do_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,18 +102,9 @@ output_aspa(struct vap_tree *vaps)
|
|||||||
{
|
{
|
||||||
struct vap *v;
|
struct vap *v;
|
||||||
|
|
||||||
json_do_object("provider_authorizations", 0);
|
json_do_array("aspas");
|
||||||
|
RB_FOREACH(v, vap_tree, vaps)
|
||||||
json_do_array("ipv4");
|
print_vap(v);
|
||||||
RB_FOREACH(v, vap_tree, vaps) {
|
|
||||||
print_vap(v, AFI_IPV4);
|
|
||||||
}
|
|
||||||
json_do_end();
|
|
||||||
|
|
||||||
json_do_array("ipv6");
|
|
||||||
RB_FOREACH(v, vap_tree, vaps) {
|
|
||||||
print_vap(v, AFI_IPV6);
|
|
||||||
}
|
|
||||||
json_do_end();
|
json_do_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: print.c,v 1.40 2023/06/05 14:19:13 claudio Exp $ */
|
/* $OpenBSD: print.c,v 1.41 2023/06/26 18:39:53 job 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>
|
||||||
@ -613,59 +613,23 @@ rsc_print(const X509 *x, const struct rsc *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
aspa_provider(uint32_t as, enum afi afi)
|
aspa_provider(uint32_t as)
|
||||||
{
|
{
|
||||||
if (outformats & FORMAT_JSON) {
|
if (outformats & FORMAT_JSON) {
|
||||||
json_do_object("aspa", 1);
|
json_do_object("aspa", 1);
|
||||||
json_do_uint("asid", as);
|
json_do_uint("asid", as);
|
||||||
if (afi == AFI_IPV4)
|
|
||||||
json_do_string("afi_limit", "ipv4");
|
|
||||||
if (afi == AFI_IPV6)
|
|
||||||
json_do_string("afi_limit", "ipv6");
|
|
||||||
json_do_end();
|
json_do_end();
|
||||||
} else {
|
} else {
|
||||||
printf("AS: %u", as);
|
printf("AS: %u", as);
|
||||||
if (afi == AFI_IPV4)
|
|
||||||
printf(" (IPv4 only)");
|
|
||||||
if (afi == AFI_IPV6)
|
|
||||||
printf(" (IPv6 only)");
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
aspa_providers(const struct aspa *a)
|
|
||||||
{
|
|
||||||
size_t i;
|
|
||||||
int hasv4 = 0, hasv6 = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < a->providersz; i++) {
|
|
||||||
if ((outformats & FORMAT_JSON) == 0 && i > 0)
|
|
||||||
printf("%26s", "");
|
|
||||||
aspa_provider(a->providers[i].as, a->providers[i].afi);
|
|
||||||
|
|
||||||
switch (a->providers[i].afi) {
|
|
||||||
case AFI_IPV4:
|
|
||||||
hasv4 = 1;
|
|
||||||
break;
|
|
||||||
case AFI_IPV6:
|
|
||||||
hasv6 = 1;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
hasv4 = hasv6 = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hasv4)
|
|
||||||
aspa_provider(0, AFI_IPV4);
|
|
||||||
if (!hasv6)
|
|
||||||
aspa_provider(0, AFI_IPV6);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
aspa_print(const X509 *x, const struct aspa *p)
|
aspa_print(const X509 *x, const struct aspa *p)
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
if (outformats & FORMAT_JSON) {
|
if (outformats & FORMAT_JSON) {
|
||||||
json_do_string("type", "aspa");
|
json_do_string("type", "aspa");
|
||||||
json_do_string("ski", pretty_key_id(p->ski));
|
json_do_string("ski", pretty_key_id(p->ski));
|
||||||
@ -697,7 +661,11 @@ aspa_print(const X509 *x, const struct aspa *p)
|
|||||||
printf("Provider set: ");
|
printf("Provider set: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
aspa_providers(p);
|
for (i = 0; i < p->providersz; i++) {
|
||||||
|
if ((outformats & FORMAT_JSON) == 0 && i > 0)
|
||||||
|
printf("%26s", "");
|
||||||
|
aspa_provider(p->providers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
if (outformats & FORMAT_JSON)
|
if (outformats & FORMAT_JSON)
|
||||||
json_do_end();
|
json_do_end();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: rpki-client.8,v 1.96 2023/06/07 16:23:02 job Exp $
|
.\" $OpenBSD: rpki-client.8,v 1.97 2023/06/26 18:39:53 job Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
.\" Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
|
||||||
.\"
|
.\"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: June 7 2023 $
|
.Dd $Mdocdate: June 26 2023 $
|
||||||
.Dt RPKI-CLIENT 8
|
.Dt RPKI-CLIENT 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -389,7 +389,7 @@ agreement regarding ARIN service restrictions.
|
|||||||
.Rs
|
.Rs
|
||||||
.%T A Profile for Autonomous System Provider Authorization (ASPA)
|
.%T A Profile for Autonomous System Provider Authorization (ASPA)
|
||||||
.%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-profile
|
.%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-profile
|
||||||
.%D Jan, 2023
|
.%D Jun, 2023
|
||||||
.Re
|
.Re
|
||||||
.Pp
|
.Pp
|
||||||
.Rs
|
.Rs
|
||||||
|
Loading…
Reference in New Issue
Block a user