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.
This commit is contained in:
Simon Kelley
2025-07-22 22:39:56 +01:00
parent d976d94e3d
commit e775264539

View File

@@ -643,7 +643,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbu
case DHCP6SOLICIT: case DHCP6SOLICIT:
{ {
int address_assigned = 0; int address_assigned;
/* tags without all prefix-class tags */ /* tags without all prefix-class tags */
struct dhcp_netid *solicit_tags; struct dhcp_netid *solicit_tags;
struct dhcp_context *c; 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: request_no_address:
solicit_tags = tagif; solicit_tags = tagif;
address_assigned = 0;
if (ignore) if (ignore)
return 0; return 0;