sync with OpenBSD -current

This commit is contained in:
purplerain 2023-12-15 04:25:16 +00:00
parent 8801582927
commit 30cf31d90d
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
55 changed files with 633 additions and 516 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: frontend.c,v 1.64 2022/07/12 16:54:59 florian Exp $ */
/* $OpenBSD: frontend.c,v 1.65 2023/12/14 09:58:59 claudio Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@ -314,7 +314,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
fatalx("%s: received unexpected imsg fd "
"to frontend", __func__);
if ((fd = imsg.fd) == -1)
if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg fd to "
"frontend but didn't receive any",
__func__);
@ -332,7 +332,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
event_add(&iev_engine->ev, NULL);
break;
case IMSG_ICMP6SOCK:
if ((icmp6sock = imsg.fd) == -1)
if ((icmp6sock = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"ICMPv6 fd but didn't receive any",
__func__);
@ -343,7 +343,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
set_icmp6sock(icmp6sock, rdomain);
break;
case IMSG_ROUTESOCK:
if ((fd = imsg.fd) == -1)
if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"routesocket fd but didn't receive any",
__func__);
@ -355,7 +355,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
break;
#ifndef SMALL
case IMSG_CONTROLFD:
if ((fd = imsg.fd) == -1)
if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"control fd but didn't receive any",
__func__);