From e775264539519efb8434143bd8f0d4fc8f5936c3 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Tue, 22 Jul 2025 22:39:56 +0100 Subject: [PATCH] Fix wrong status in reply to DHCP6REQUEST. If we jump to label request_no_address, address_assigned has an undefined value, and maybe the wrong status is returned. --- src/rfc3315.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rfc3315.c b/src/rfc3315.c index 90b50ce..fa7448f 100644 --- a/src/rfc3315.c +++ b/src/rfc3315.c @@ -643,7 +643,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbu case DHCP6SOLICIT: { - int address_assigned = 0; + int address_assigned; /* tags without all prefix-class tags */ struct dhcp_netid *solicit_tags; struct dhcp_context *c; @@ -662,6 +662,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbu request_no_address: solicit_tags = tagif; + address_assigned = 0; if (ignore) return 0;