// Use the second duid
client.setDUID(duid2);
- // Use the second IAID
- client.config_.leases_[0].iaid_ = iaid2;
+ // Use the second IAID (but not in NO_IA which has cleared leases)
+ if (addr_type != NO_IA) {
+ ASSERT_NE(0, client.config_.leases_.size());
+ client.config_.leases_[0].iaid_ = iaid2;
+ }
// Ok, let's decline the lease.
ASSERT_NO_THROW(client.doDecline(include_address_));
SecBuf(const std::vector<T>& x) : vec_(x) {}
~SecBuf() {
+#if defined(__has_feature) && __has_feature(address_sanitizer)
+ // Make the address sanitizer happy assuming this won't reallocate
+ vec_.resize(vec_.capacity());
+#endif
std::memset(&vec_[0], 0, vec_.capacity() * sizeof(T));
};
};
void clear() {
+#if defined(__has_feature) && __has_feature(address_sanitizer)
+ // Make the address sanitizer happy assuming this won't reallocate
+ vec_.resize(vec_.capacity());
+#endif
std::memset(&vec_[0], 0, vec_.capacity() * sizeof(T));
vec_.clear();
}