From: sbyx Date: Tue, 26 Mar 2013 13:26:25 +0000 (-0700) Subject: Merge pull request #6 from fingon/bugfix X-Git-Tag: debian/1.1+git20160131-1~168 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=commitdiff_plain;h=920fda0ef9da478202fc330cc887e1ef3d703925;hp=85cdc08d7249ec8f6d2e0b94ea3cd5ff2ee141ad Merge pull request #6 from fingon/bugfix Fixed a race condition with signals --- 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)