X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fdhcpv6.c;h=ec42b32c54a430fd9e119e4f34cab600c339463b;hb=ba6df2a68fcad5040f3746419aaac2bc3283a33d;hp=20343e47538a68d3280c36435bef0d59ff346c82;hpb=7dcb066e88b3b201e29b308d896030573659acf4;p=odhcp6c.git diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 20343e4..ec42b32 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -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))