TUN-6791: Calculate ICMPv6 checksum

This commit is contained in:
cthuang
2022-09-22 10:49:19 +01:00
committed by Chung-Ting Huang
parent 7f487c2651
commit 3449ea35f2
5 changed files with 134 additions and 7 deletions

View File

@@ -152,6 +152,7 @@ func TestDecodeICMP(t *testing.T) {
require.Equal(t, test.packet.Type, icmpPacket.Type)
require.Equal(t, test.packet.Code, icmpPacket.Code)
assertICMPChecksum(t, icmpPacket)
require.Equal(t, test.packet.Body, icmpPacket.Body)
expectedBody, err := test.packet.Body.Marshal(test.packet.Type.Protocol())
require.NoError(t, err)