dhcpleased: fix a sizeof for IMSG_REQUEST_REBOOT.
authortb <tb@openbsd.org>
Sun, 1 Sep 2024 20:24:42 +0000 (20:24 +0000)
committertb <tb@openbsd.org>
Sun, 1 Sep 2024 20:24:42 +0000 (20:24 +0000)
"fatal in engine: engine_dispatch_frontend: invalid IMSG_REQUEST_REBOOT"
reported by qwer.ty tuta io

ok florian kn

sbin/dhcpleased/control.c

index b6043f5..87bd775 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: control.c,v 1.5 2024/08/25 09:53:53 florian Exp $     */
+/*     $OpenBSD: control.c,v 1.6 2024/09/01 20:24:42 tb Exp $  */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -291,7 +291,7 @@ control_dispatch_imsg(int fd, short event, void *bula)
 
                        c->iev.ibuf.pid = pid;
                        frontend_imsg_compose_engine(IMSG_REQUEST_REBOOT, 0,
-                           pid, &if_index, sizeof(&if_index));
+                           pid, &if_index, sizeof(if_index));
                        break;
                default:
                        log_debug("%s: error handling imsg %d", __func__, type);