Reintroduce Reconfigure-Accept in Request-Message
authorSteven Barth <steven@midlink.org>
Mon, 17 Feb 2014 20:18:49 +0000 (21:18 +0100)
committerSteven Barth <steven@midlink.org>
Mon, 17 Feb 2014 20:18:49 +0000 (21:18 +0100)
src/dhcpv6.c

index 20343e4..ec42b32 100644 (file)
@@ -445,16 +445,14 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs)
        }
 
        // Disable IAs if not used
-       if (type != DHCPV6_MSG_SOLICIT) {
-               iov[IOV_RECONF_ACCEPT].iov_len = 0;
-               if (ia_na_len == 0)
-                       iov[IOV_HDR_IA_NA].iov_len = 0;
-       }
+       if (type != DHCPV6_MSG_SOLICIT && ia_na_len == 0)
+               iov[IOV_HDR_IA_NA].iov_len = 0;
 
        if (na_mode == IA_MODE_NONE)
                iov[IOV_HDR_IA_NA].iov_len = 0;
 
-       if (!(client_options & DHCPV6_ACCEPT_RECONFIGURE))
+       if ((type != DHCPV6_MSG_SOLICIT && type != DHCPV6_MSG_REQUEST) ||
+                       !(client_options & DHCPV6_ACCEPT_RECONFIGURE))
                iov[IOV_RECONF_ACCEPT].iov_len = 0;
 
        if (!(client_options & DHCPV6_CLIENT_FQDN))