1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 04:34:27 +01:00

Set last next protocol to 0 if no inner_pdu on IPv6

This commit is contained in:
Matias Fontanini
2016-09-29 07:36:23 -07:00
parent 54ce11629c
commit 2847039ffe

View File

@@ -232,6 +232,9 @@ void IPv6::write_serialization(uint8_t* buffer, uint32_t total_sz, const PDU* pa
set_last_next_header(new_flag);
}
}
else {
set_last_next_header(0);
}
payload_length(static_cast<uint16_t>(total_sz - sizeof(header_)));
stream.write(header_);
for (headers_type::const_iterator it = ext_headers_.begin(); it != ext_headers_.end(); ++it) {