summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/dhcpleased/control.c4
-rw-r--r--sbin/dhcpleased/dhcpleased.h5
-rw-r--r--sbin/dhcpleased/engine.c4
-rw-r--r--sbin/dhcpleased/frontend.c9
4 files changed, 13 insertions, 9 deletions
diff --git a/sbin/dhcpleased/control.c b/sbin/dhcpleased/control.c
index 9a713cb9913..d29e3fb1639 100644
--- a/sbin/dhcpleased/control.c
+++ b/sbin/dhcpleased/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.3 2021/07/26 09:26:36 florian Exp $ */
+/* $OpenBSD: control.c,v 1.4 2021/08/01 09:07:03 florian Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -280,7 +280,7 @@ control_dispatch_imsg(int fd, short event, void *bula)
if (IMSG_DATA_SIZE(imsg) != sizeof(uint32_t))
break;
c->iev.ibuf.pid = imsg.hdr.pid;
- frontend_imsg_compose_engine(imsg.hdr.type, 0,
+ frontend_imsg_compose_engine(IMSG_REQUEST_REBOOT, 0,
imsg.hdr.pid, imsg.data, IMSG_DATA_SIZE(imsg));
break;
default:
diff --git a/sbin/dhcpleased/dhcpleased.h b/sbin/dhcpleased/dhcpleased.h
index c436558bc82..7f6ec87ad19 100644
--- a/sbin/dhcpleased/dhcpleased.h
+++ b/sbin/dhcpleased/dhcpleased.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpleased.h,v 1.9 2021/07/28 07:57:10 anton Exp $ */
+/* $OpenBSD: dhcpleased.h,v 1.10 2021/08/01 09:07:03 florian Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -190,6 +190,7 @@ enum imsg_type {
#ifndef SMALL
IMSG_CTL_LOG_VERBOSE,
IMSG_CTL_SHOW_INTERFACE_INFO,
+ IMSG_CTL_SEND_REQUEST,
IMSG_CTL_RELOAD,
IMSG_CTL_END,
IMSG_RECONF_CONF,
@@ -198,7 +199,6 @@ enum imsg_type {
IMSG_RECONF_C_ID,
IMSG_RECONF_END,
#endif /* SMALL */
- IMSG_CTL_SEND_REQUEST,
IMSG_SEND_DISCOVER,
IMSG_SEND_REQUEST,
IMSG_SOCKET_IPC,
@@ -217,6 +217,7 @@ enum imsg_type {
IMSG_PROPOSE_RDNS,
IMSG_WITHDRAW_RDNS,
IMSG_REPROPOSE_RDNS,
+ IMSG_REQUEST_REBOOT,
};
#ifndef SMALL
diff --git a/sbin/dhcpleased/engine.c b/sbin/dhcpleased/engine.c
index 060d0de5a2c..79ea38c8d22 100644
--- a/sbin/dhcpleased/engine.c
+++ b/sbin/dhcpleased/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.22 2021/07/26 09:26:36 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.23 2021/08/01 09:07:03 florian Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -317,7 +317,7 @@ engine_dispatch_frontend(int fd, short event, void *bula)
memcpy(&if_index, imsg.data, sizeof(if_index));
engine_showinfo_ctl(&imsg, if_index);
break;
- case IMSG_CTL_SEND_REQUEST:
+ case IMSG_REQUEST_REBOOT:
if (IMSG_DATA_SIZE(imsg) != sizeof(if_index))
fatalx("%s: IMSG_CTL_SEND_DISCOVER wrong "
"length: %lu", __func__,
diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c
index bf33e6e5e48..249c6718cf5 100644
--- a/sbin/dhcpleased/frontend.c
+++ b/sbin/dhcpleased/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.15 2021/07/27 18:17:37 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.16 2021/08/01 09:07:03 florian Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -761,7 +761,9 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info)
log_debug("RTP_PROPOSAL_SOLICIT");
frontend_imsg_compose_engine(IMSG_REPROPOSE_RDNS,
0, 0, NULL, 0);
- } else if (rtm->rtm_flags & RTF_PROTO3) {
+ }
+#ifndef SMALL
+ else if (rtm->rtm_flags & RTF_PROTO3) {
uint32_t if_index;
char ifnamebuf[IF_NAMESIZE], *if_name;
@@ -769,9 +771,10 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info)
if_name = if_indextoname(if_index, ifnamebuf);
log_warnx("\"dhclient %s\" ran, requesting new lease",
if_name != NULL ? if_name : "(unknown)");
- frontend_imsg_compose_engine(IMSG_CTL_SEND_REQUEST,
+ frontend_imsg_compose_engine(IMSG_REQUEST_REBOOT,
0, 0, &if_index, sizeof(if_index));
}
+#endif /* SMALL */
break;
default:
log_debug("unexpected RTM: %d", rtm->rtm_type);