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

Fix next header handling on IPv6

This was broken by design. Each header held the next header's
type, which made iterating through them very tricky (you'd have
to look at the previous header's next header value to know the
current one while doing so).

Now each header contains its own value and the next header
value is computed during serialization and then reverted back
after that.
This commit is contained in:
Matias Fontanini
2017-05-14 10:25:59 -07:00
parent f0aaec98f3
commit 5404e9f004
3 changed files with 84 additions and 13 deletions

View File

@@ -346,6 +346,7 @@ private:
ipv6_header header_;
headers_type ext_headers_;
uint8_t next_header_;
};
}