diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2024-06-06 15:15:45 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2024-06-06 15:15:45 +0000 |
commit | b366eeef12047f542a7ada4824d617f389ca9efc (patch) | |
tree | 613d40044ad7dae86e31607b831081b3f8e0140f /sbin/dhcp6leased | |
parent | f1ca829a5f49aa0a575ba6164cd16735561d6be7 (diff) |
hand PD_IAs to dhcp6leasectl
Diffstat (limited to 'sbin/dhcp6leased')
-rw-r--r-- | sbin/dhcp6leased/dhcp6leased.h | 17 | ||||
-rw-r--r-- | sbin/dhcp6leased/engine.c | 3 |
2 files changed, 11 insertions, 9 deletions
diff --git a/sbin/dhcp6leased/dhcp6leased.h b/sbin/dhcp6leased/dhcp6leased.h index 040cf8cbb6b..f2855759db9 100644 --- a/sbin/dhcp6leased/dhcp6leased.h +++ b/sbin/dhcp6leased/dhcp6leased.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp6leased.h,v 1.7 2024/06/05 16:15:47 florian Exp $ */ +/* $OpenBSD: dhcp6leased.h,v 1.8 2024/06/06 15:15:44 florian Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -175,6 +175,13 @@ enum imsg_type { IMSG_WRITE_LEASE, }; +struct prefix { + struct in6_addr prefix; + int prefix_len; + uint32_t vltime; + uint32_t pltime; +}; + struct ctl_engine_info { uint32_t if_index; int running; @@ -184,6 +191,7 @@ struct ctl_engine_info { uint32_t lease_time; uint32_t t1; uint32_t t2; + struct prefix pds[MAX_IA]; }; struct iface_pd_conf { @@ -213,13 +221,6 @@ struct dhcp6leased_conf { int rapid_commit; }; -struct prefix { - struct in6_addr prefix; - int prefix_len; - uint32_t vltime; - uint32_t pltime; -}; - struct imsg_ifinfo { uint32_t if_index; int rdomain; diff --git a/sbin/dhcp6leased/engine.c b/sbin/dhcp6leased/engine.c index 6f9ccf16108..180847406b1 100644 --- a/sbin/dhcp6leased/engine.c +++ b/sbin/dhcp6leased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.12 2024/06/05 16:15:47 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.13 2024/06/06 15:15:44 florian Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org> @@ -572,6 +572,7 @@ send_interface_info(struct dhcp6leased_iface *iface, pid_t pid) cei.lease_time = iface->lease_time; cei.t1 = iface->t1; cei.t2 = iface->t2; + memcpy(&cei.pds, &iface->pds, sizeof(cei.pds)); engine_imsg_compose_frontend(IMSG_CTL_SHOW_INTERFACE_INFO, pid, &cei, sizeof(cei)); } |