summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-11-25 17:58:50 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-25 18:00:41 -0800
commitbc81fccedae4c66e61a6b62eac44dd11fae413ac (patch)
tree977dadd085f864f6dc865ab567a1697548de4700 /test/packetimpact
parent2485a4e2cb4aaee8f1a5e760541fb02e9090de44 (diff)
Support listener-side MLDv1
...as defined by RFC 2710. Querier (router)-side MLDv1 is not yet supported. The core state machine is shared with IGMPv2. This is guarded behind a flag (ipv6.Options.MLDEnabled). Tests: ip_test.TestMGP* Bug #4861 PiperOrigin-RevId: 344344095
Diffstat (limited to 'test/packetimpact')
-rw-r--r--test/packetimpact/testbench/layers.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/packetimpact/testbench/layers.go b/test/packetimpact/testbench/layers.go
index 7401a1991..9df072cfd 100644
--- a/test/packetimpact/testbench/layers.go
+++ b/test/packetimpact/testbench/layers.go
@@ -830,7 +830,9 @@ func (l *ICMPv6) ToBytes() ([]byte, error) {
if l.Code != nil {
h.SetCode(*l.Code)
}
- copy(h.NDPPayload(), l.Payload)
+ if n := copy(h.MessageBody(), l.Payload); n != len(l.Payload) {
+ panic(fmt.Sprintf("copied %d bytes, expected to copy %d bytes", n, len(l.Payload)))
+ }
if l.Checksum != nil {
h.SetChecksum(*l.Checksum)
} else {
@@ -876,7 +878,7 @@ func parseICMPv6(b []byte) (Layer, layerParser) {
Type: ICMPv6Type(h.Type()),
Code: ICMPv6Code(h.Code()),
Checksum: Uint16(h.Checksum()),
- Payload: h.NDPPayload(),
+ Payload: h.MessageBody(),
}
return &icmpv6, nil
}