From 797317aae708139b358b7b58d611fddde869f04a Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 25 Mar 2013 12:45:38 +0100 Subject: [PATCH] Fix IA-status detection --- src/dhcpv6.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index e991958..d2da053 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -647,6 +647,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, if (ia_hdr->iaid != 1 || l_t2 < l_t1) continue; + bool error = false; uint16_t stype, slen; uint8_t *sdata; // Test status and bail if error @@ -654,7 +655,10 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, stype, slen, sdata) if (stype == DHCPV6_OPT_STATUS && slen >= 2 && (sdata[0] || sdata[1])) - continue; + error = true; + + if (error) + continue; // Update times if (l_t1 > 0 && t1 > l_t1) -- 2.39.2