sync with OpenBSD -current

This commit is contained in:
purplerain 2024-04-25 02:25:45 +00:00
parent 12ef7bd342
commit 87d00f0a9c
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
16 changed files with 40 additions and 68 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: magma.c,v 1.35 2022/07/02 08:50:42 visa Exp $ */
/* $OpenBSD: magma.c,v 1.36 2024/04/24 09:30:30 claudio Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@ -187,8 +187,6 @@ struct cfdriver mbpp_cd = {
*
* cd1400_compute_baud calculate COR/BPR register values
* cd1400_write_ccr write a value to CD1400 ccr
* cd1400_read_reg read from a CD1400 register
* cd1400_write_reg write to a CD1400 register
* cd1400_enable_transmitter enable transmitting on CD1400 channel
*/
@ -224,11 +222,11 @@ cd1400_compute_baud(speed_t speed, int clock, int *cor, int *bpr)
/*
* Write a CD1400 channel command, should have a timeout?
*/
__inline void
static inline void
cd1400_write_ccr(struct cd1400 *cd, u_char cmd)
{
while (CD1400_READ_REG(cd, CD1400_CCR))
/*EMPTY*/;
continue;
CD1400_WRITE_REG(cd, CD1400_CCR, cmd);
}

View File

@ -1,4 +1,4 @@
/* $OpenBSD: magmareg.h,v 1.10 2020/02/18 00:12:08 cheloha Exp $ */
/* $OpenBSD: magmareg.h,v 1.11 2024/04/24 09:30:30 claudio Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@ -197,9 +197,6 @@ struct mbpp_softc {
/* internal function prototypes */
int cd1400_compute_baud(speed_t, int, int *, int *);
__inline void cd1400_write_ccr(struct cd1400 *, u_char);
__inline u_char cd1400_read_reg(struct cd1400 *, int);
__inline void cd1400_write_reg(struct cd1400 *, int, u_char);
void cd1400_enable_transmitter(struct cd1400 *, int);
int magma_match(struct device *, void *, void *);

View File

@ -1,10 +1,10 @@
/* $OpenBSD: init_sysent.c,v 1.278 2024/04/15 15:09:26 claudio Exp $ */
/* $OpenBSD: init_sysent.c,v 1.279 2024/04/24 19:10:11 claudio Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from; OpenBSD: syscalls.master,v 1.261 2024/04/15 15:08:20 claudio Exp
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
*/
#include <sys/param.h>
@ -254,7 +254,7 @@ const struct sysent sysent[] = {
sys_ppoll }, /* 109 = ppoll */
{ 6, s(struct sys_pselect_args), SY_NOLOCK | 0,
sys_pselect }, /* 110 = pselect */
{ 1, s(struct sys_sigsuspend_args), SY_NOLOCK | 0,
{ 1, s(struct sys_sigsuspend_args), 0,
sys_sigsuspend }, /* 111 = sigsuspend */
{ 3, s(struct sys_sendsyslog_args), SY_NOLOCK | 0,
sys_sendsyslog }, /* 112 = sendsyslog */
@ -695,7 +695,7 @@ const struct sysent sysent[] = {
sys___thrwakeup }, /* 301 = __thrwakeup */
{ 1, s(struct sys___threxit_args), 0,
sys___threxit }, /* 302 = __threxit */
{ 3, s(struct sys___thrsigdivert_args), SY_NOLOCK | 0,
{ 3, s(struct sys___thrsigdivert_args), 0,
sys___thrsigdivert }, /* 303 = __thrsigdivert */
{ 2, s(struct sys___getcwd_args), 0,
sys___getcwd }, /* 304 = __getcwd */

View File

@ -1,10 +1,10 @@
/* $OpenBSD: syscalls.c,v 1.276 2024/04/15 15:09:26 claudio Exp $ */
/* $OpenBSD: syscalls.c,v 1.277 2024/04/24 19:10:11 claudio Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from; OpenBSD: syscalls.master,v 1.261 2024/04/15 15:08:20 claudio Exp
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
*/
const char *const syscallnames[] = {

View File

@ -1,4 +1,4 @@
; $OpenBSD: syscalls.master,v 1.261 2024/04/15 15:08:20 claudio Exp $
; $OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@ -234,7 +234,7 @@
110 STD NOLOCK { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
fd_set *ex, const struct timespec *ts, \
const sigset_t *mask); }
111 STD NOLOCK { int sys_sigsuspend(int mask); }
111 STD { int sys_sigsuspend(int mask); }
112 STD NOLOCK { int sys_sendsyslog(const char *buf, size_t nbyte, \
int flags); }
113 UNIMPL fktrace
@ -525,7 +525,7 @@
301 STD NOLOCK { int sys___thrwakeup(const volatile void *ident, \
int n); }
302 STD { void sys___threxit(pid_t *notdead); }
303 STD NOLOCK { int sys___thrsigdivert(sigset_t sigmask, \
303 STD { int sys___thrsigdivert(sigset_t sigmask, \
siginfo_t *info, const struct timespec *timeout); }
304 STD { int sys___getcwd(char *buf, size_t len); }
305 STD NOLOCK { int sys_adjfreq(const int64_t *freq, \

View File

@ -1,10 +1,10 @@
/* $OpenBSD: syscall.h,v 1.275 2024/04/15 15:09:26 claudio Exp $ */
/* $OpenBSD: syscall.h,v 1.276 2024/04/24 19:10:11 claudio Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from; OpenBSD: syscalls.master,v 1.261 2024/04/15 15:08:20 claudio Exp
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
*/
/* syscall: "exit" ret: "void" args: "int" */

View File

@ -1,10 +1,10 @@
/* $OpenBSD: syscallargs.h,v 1.278 2024/04/15 15:09:26 claudio Exp $ */
/* $OpenBSD: syscallargs.h,v 1.279 2024/04/24 19:10:11 claudio Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from; OpenBSD: syscalls.master,v 1.261 2024/04/15 15:08:20 claudio Exp
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
*/
#ifdef syscallarg

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: vi.1,v 1.84 2024/02/12 16:42:42 job Exp $
.\" $OpenBSD: vi.1,v 1.85 2024/04/24 15:15:40 job Exp $
.\"
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
@ -14,7 +14,7 @@
.\"
.\" @(#)vi.1 8.51 (Berkeley) 10/10/96
.\"
.Dd $Mdocdate: February 12 2024 $
.Dd $Mdocdate: April 24 2024 $
.Dt VI 1
.Os
.Sh NAME
@ -2461,7 +2461,7 @@ Set the number of lines about which the editor reports changes or yanks.
.It Cm ruler Bq off
.Nm vi
only.
Display a row/column ruler on the colon command line.
Display a row/column/percentage ruler on the colon command line.
.It Cm scroll , scr Bq "($LINES \- 1) / 2"
Set the number of lines scrolled.
.It Cm searchincr Bq off

View File

@ -1,4 +1,4 @@
/* $OpenBSD: vs_refresh.c,v 1.23 2024/02/12 16:42:43 job Exp $ */
/* $OpenBSD: vs_refresh.c,v 1.24 2024/04/24 15:15:40 job Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@ -782,6 +782,7 @@ vs_modeline(SCR *sp)
const char *t = NULL;
int ellipsis;
char *p, buf[20];
recno_t last;
/*
* It's possible that this routine will be called after sp->frp
@ -857,8 +858,14 @@ vs_modeline(SCR *sp)
cols = sp->cols - 1;
if (O_ISSET(sp, O_RULER)) {
vs_column(sp, &curcol);
len = snprintf(buf, sizeof(buf), "%lu,%zu",
(ulong)sp->lno, curcol + 1);
if (db_last(sp, &last))
len = snprintf(buf, sizeof(buf), "%lu,%zu",
(ulong)sp->lno, curcol + 1);
else
len = snprintf(buf, sizeof(buf), "%lu,%zu %lu%%",
(ulong)sp->lno, curcol + 1,
(unsigned long)(sp->lno * 100) / last);
midpoint = (cols - ((len + 1) / 2)) / 2;
if (curlen < midpoint) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: output_json.c,v 1.42 2024/01/31 11:23:20 claudio Exp $ */
/* $OpenBSD: output_json.c,v 1.43 2024/04/24 10:42:09 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
@ -250,7 +250,6 @@ json_neighbor_full(struct peer *p)
json_do_string("role", log_policy(p->conf.role));
/* capabilities */
json_do_bool("announce_capabilities", p->conf.announce_capa);
json_neighbor_capabilities(&p->conf.capabilities);
json_do_end();

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: bgpd.conf.5,v 1.239 2024/04/09 09:03:18 claudio Exp $
.\" $OpenBSD: bgpd.conf.5,v 1.240 2024/04/24 10:41:34 claudio Exp $
.\"
.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 9 2024 $
.Dd $Mdocdate: April 24 2024 $
.Dt BGPD.CONF 5
.Os
.Sh NAME
@ -1064,17 +1064,6 @@ The default is
.Ic yes .
.Pp
.It Xo
.Ic announce capabilities
.Pq Ic yes Ns | Ns Ic no
.Xc
If set to
.Ic no ,
capability negotiation is disabled during the establishment of the session.
This can be helpful to connect to old or broken BGP implementations.
The default is
.Ic yes .
.Pp
.It Xo
.Ic announce enhanced refresh
.Pq Ic yes Ns | Ns Ic no Ns | Ns Ic enforce
.Xc

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bgpd.h,v 1.491 2024/04/09 12:09:19 claudio Exp $ */
/* $OpenBSD: bgpd.h,v 1.492 2024/04/24 10:41:34 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -479,7 +479,6 @@ struct peer_config {
uint8_t distance; /* 1 = direct, >1 = multihop */
uint8_t passive;
uint8_t down;
uint8_t announce_capa;
uint8_t reflector_client;
uint8_t ttlsec; /* TTL security hack */
uint8_t flags;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: parse.y,v 1.461 2024/04/11 18:07:55 tb Exp $ */
/* $OpenBSD: parse.y,v 1.462 2024/04/24 10:41:34 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -246,7 +246,7 @@ typedef struct {
%token EBGP IBGP
%token FLOWSPEC PROTO FLAGS FRAGMENT TOS LENGTH ICMPTYPE CODE
%token LOCALAS REMOTEAS DESCR LOCALADDR MULTIHOP PASSIVE MAXPREFIX RESTART
%token ANNOUNCE CAPABILITIES REFRESH AS4BYTE CONNECTRETRY ENHANCED ADDPATH
%token ANNOUNCE REFRESH AS4BYTE CONNECTRETRY ENHANCED ADDPATH
%token SEND RECV PLUS POLICY ROLE
%token DEMOTE ENFORCE NEIGHBORAS ASOVERRIDE REFLECTOR DEPEND DOWN
%token DUMP IN OUT SOCKET RESTRICTED
@ -1912,9 +1912,6 @@ peeropts : REMOTEAS as4number {
curpeer->conf.capabilities.mp[aid] = 1;
}
}
| ANNOUNCE CAPABILITIES yesno {
curpeer->conf.announce_capa = $3;
}
| ANNOUNCE REFRESH yesnoenforce {
curpeer->conf.capabilities.refresh = $3;
}
@ -3522,7 +3519,6 @@ lookup(char *s)
{ "aspa-set", ASPASET},
{ "avs", AVS},
{ "blackhole", BLACKHOLE},
{ "capabilities", CAPABILITIES},
{ "community", COMMUNITY},
{ "compare", COMPARE},
{ "connect-retry", CONNECTRETRY},
@ -4635,7 +4631,6 @@ alloc_peer(void)
p->reconf_action = RECONF_REINIT;
p->conf.distance = 1;
p->conf.export_type = EXPORT_UNSET;
p->conf.announce_capa = 1;
p->conf.capabilities.refresh = 1;
p->conf.capabilities.grestart.restart = 1;
p->conf.capabilities.as4byte = 1;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: printconf.c,v 1.171 2024/04/09 09:03:18 claudio Exp $ */
/* $OpenBSD: printconf.c,v 1.172 2024/04/24 10:41:34 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -918,9 +918,6 @@ print_announce(struct peer_config *p, const char *c)
uint8_t aid;
int match = 0;
if (p->announce_capa == 0)
printf("%s\tannounce capabilities no\n", c);
for (aid = AID_MIN; aid < AID_MAX; aid++)
if (p->capabilities.mp[aid] == 2) {
printf("%s\tannounce %s enforce\n", c, aid2str(aid));

View File

@ -1,4 +1,4 @@
/* $OpenBSD: session.c,v 1.473 2024/04/22 09:43:11 claudio Exp $ */
/* $OpenBSD: session.c,v 1.474 2024/04/24 10:41:34 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@ -66,7 +66,6 @@ int session_setup_socket(struct peer *);
void session_accept(int);
int session_connect(struct peer *);
void session_tcp_established(struct peer *);
void session_capa_ann_none(struct peer *);
int session_capa_add(struct ibuf *, uint8_t, uint8_t);
int session_capa_add_mp(struct ibuf *, uint8_t);
int session_capa_add_afi(struct ibuf *, uint8_t, uint8_t);
@ -931,8 +930,6 @@ change_state(struct peer *peer, enum session_state state,
/* initialize capability negotiation structures */
memcpy(&peer->capa.ann, &peer->conf.capabilities,
sizeof(peer->capa.ann));
if (!peer->conf.announce_capa)
session_capa_ann_none(peer);
}
break;
case STATE_CONNECT:
@ -1330,12 +1327,6 @@ session_tcp_established(struct peer *peer)
&peer->if_scope);
}
void
session_capa_ann_none(struct peer *peer)
{
memset(&peer->capa.ann, 0, sizeof(peer->capa.ann));
}
int
session_capa_add(struct ibuf *opb, uint8_t capa_code, uint8_t capa_len)
{

View File

@ -1,4 +1,4 @@
/* $OpenBSD: smtpd.c,v 1.349 2024/02/03 15:50:00 op Exp $ */
/* $OpenBSD: smtpd.c,v 1.350 2024/04/24 21:31:31 op Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@ -1137,7 +1137,7 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
if (strlcpy(name, conf, sizeof(name)) >= sizeof(name)) {
log_warnx("warn: %s-proc: conf too long", key);
return (0);
return (-1);
}
arg = strchr(name, ':');