From 2847039ffe87e5d789d1f9917952bbe9d72e576a Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Thu, 29 Sep 2016 07:36:23 -0700 Subject: [PATCH] Set last next protocol to 0 if no inner_pdu on IPv6 --- src/ipv6.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ipv6.cpp b/src/ipv6.cpp index 558ac81..f5b2e0f 100644 --- a/src/ipv6.cpp +++ b/src/ipv6.cpp @@ -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(total_sz - sizeof(header_))); stream.write(header_); for (headers_type::const_iterator it = ext_headers_.begin(); it != ext_headers_.end(); ++it) {