From: florian Date: Thu, 11 Jul 2024 09:39:13 +0000 (+0000) Subject: Forgot to initialize status_code in previous. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=363167f48f4308ba0d1a21a347c4d2c6274afdac;p=openbsd Forgot to initialize status_code in previous. No STATUS_CODE option from the server means "success", but we are now using stack garbage, which is usually not "success". --- diff --git a/sbin/dhcp6leased/engine.c b/sbin/dhcp6leased/engine.c index c8997b37d0b..c454e38844c 100644 --- a/sbin/dhcp6leased/engine.c +++ b/sbin/dhcp6leased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.20 2024/07/10 12:52:51 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.21 2024/07/11 09:39:13 florian Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser @@ -947,7 +947,7 @@ parse_ia_pd_options(uint8_t *p, size_t len, struct prefix *prefix) struct dhcp_iaprefix iaprefix; struct in6_addr mask; int i; - uint16_t status_code; + uint16_t status_code = DHCP_STATUS_SUCCESS; char ntopbuf[INET6_ADDRSTRLEN], *visbuf; while (len >= sizeof(struct dhcp_option_hdr)) {