sync with OpenBSD -current

This commit is contained in:
purplerain 2024-01-19 01:25:19 +00:00
parent 1cefe29c7e
commit fdad81bcfc
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
32 changed files with 162 additions and 207 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: in_pcb.c,v 1.284 2024/01/09 19:57:00 bluhm Exp $ */
/* $OpenBSD: in_pcb.c,v 1.285 2024/01/18 11:03:16 claudio Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@ -1306,6 +1306,10 @@ in_pcbset_rtableid(struct inpcb *inp, u_int rtableid)
{
struct inpcbtable *table = inp->inp_table;
/* table must exist */
if (!rtable_exists(rtableid))
return (EINVAL);
mtx_enter(&table->inpt_mtx);
if (inp->inp_lport) {
mtx_leave(&table->inpt_mtx);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ip_output.c,v 1.392 2023/12/01 15:30:47 bluhm Exp $ */
/* $OpenBSD: ip_output.c,v 1.393 2024/01/18 11:03:16 claudio Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@ -1077,11 +1077,6 @@ ip_ctloutput(int op, struct socket *so, int level, int optname,
if (rtableid != rtid && rtableid != 0 &&
(error = suser(p)) != 0)
break;
/* table must exist */
if (!rtable_exists(rtid)) {
error = EINVAL;
break;
}
error = in_pcbset_rtableid(inp, rtid);
break;
case IP_PIPEX: