mirror of
https://github.com/openbsd/src.git
synced 2026-06-17 23:03:29 +02:00
Prevent the engine from sending us a negative amount of routes.
Pointed out by Andrew Griffiths, thanks!
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dhcpleased.c,v 1.44 2026/06/15 17:08:15 florian Exp $ */
|
||||
/* $OpenBSD: dhcpleased.c,v 1.45 2026/06/15 17:09:29 florian Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
|
||||
@@ -1022,7 +1022,7 @@ configure_routes(uint8_t rtm_type, struct imsg_configure_interface *imsg)
|
||||
{
|
||||
struct sockaddr_in dst, mask, gw, ifa;
|
||||
in_addr_t addrnet, gwnet;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
memset(&ifa, 0, sizeof(ifa));
|
||||
ifa.sin_family = AF_INET;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dhcpleased.h,v 1.20 2026/05/14 06:04:08 dgl Exp $ */
|
||||
/* $OpenBSD: dhcpleased.h,v 1.21 2026/06/15 17:09:29 florian Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
|
||||
@@ -240,7 +240,7 @@ struct ctl_engine_info {
|
||||
struct in_addr requested_ip;
|
||||
struct in_addr mask;
|
||||
struct dhcp_route routes[MAX_DHCP_ROUTES];
|
||||
int routes_len;
|
||||
uint32_t routes_len;
|
||||
struct in_addr nameservers[MAX_RDNS_COUNT];
|
||||
uint32_t lease_time;
|
||||
uint32_t renewal_time;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: engine.h,v 1.3 2021/06/20 08:31:45 florian Exp $ */
|
||||
/* $OpenBSD: engine.h,v 1.4 2026/06/15 17:09:29 florian Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2021 Florian Obser <florian@openbsd.org>
|
||||
@@ -26,7 +26,7 @@ struct imsg_configure_interface {
|
||||
char domainname[4 * 255 + 1];
|
||||
char hostname[4 * 255 + 1];
|
||||
struct dhcp_route routes[MAX_DHCP_ROUTES];
|
||||
int routes_len;
|
||||
uint32_t routes_len;
|
||||
};
|
||||
|
||||
void engine(int, int);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dhcpleasectl.c,v 1.13 2024/11/21 13:38:14 claudio Exp $ */
|
||||
/* $OpenBSD: dhcpleasectl.c,v 1.14 2026/06/15 17:09:29 florian Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2021 Florian Obser <florian@openbsd.org>
|
||||
@@ -221,7 +221,7 @@ show_interface_msg(struct ctl_engine_info *cei)
|
||||
{
|
||||
struct timespec now, diff;
|
||||
time_t d, h, m, s;
|
||||
int i;
|
||||
uint32_t i;
|
||||
char buf[IF_NAMESIZE], *bufp;
|
||||
char ipbuf[INET_ADDRSTRLEN];
|
||||
char maskbuf[INET_ADDRSTRLEN];
|
||||
|
||||
Reference in New Issue
Block a user