mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 22:18:20 +00:00
Fix some IPv6 header related bugs.
- IPv6 payload length calculation didn't count main 40 byte IPv6 header. - Fix how IPv6 headers that use TLV options are built. - Fix ip6_hdr_chain$ext_order starting index at 1 instead of 0.
This commit is contained in:
parent
9d590456b0
commit
65307764f4
2 changed files with 26 additions and 10 deletions
2
src/IP.h
2
src/IP.h
|
@ -273,7 +273,7 @@ public:
|
|||
if ( ip4 )
|
||||
return ntohs(ip4->ip_len) - ip4->ip_hl * 4;
|
||||
else
|
||||
return ntohs(ip6->ip6_plen) - ip6_hdrs->TotalLength();
|
||||
return ntohs(ip6->ip6_plen) + 40 - ip6_hdrs->TotalLength();
|
||||
}
|
||||
|
||||
uint32 TotalLen() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue