summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/testbench/layers.go
diff options
context:
space:
mode:
authorJulian Elischer <jrelis@google.com>2020-11-13 17:11:12 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-13 17:13:11 -0800
commit0fee59c8c84bff0185e681b4550ba077a65739f2 (patch)
tree182fa2dd9b5101237b89f2abbc3277f1d6c65986 /test/packetimpact/testbench/layers.go
parenta1cb52447f3e9414211b9e0558f1231ae3e59329 (diff)
Requested Comment/Message wording changes
PiperOrigin-RevId: 342366891
Diffstat (limited to 'test/packetimpact/testbench/layers.go')
-rw-r--r--test/packetimpact/testbench/layers.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/packetimpact/testbench/layers.go b/test/packetimpact/testbench/layers.go
index 62473c577..7401a1991 100644
--- a/test/packetimpact/testbench/layers.go
+++ b/test/packetimpact/testbench/layers.go
@@ -410,13 +410,7 @@ func Address(v tcpip.Address) *tcpip.Address {
// continues parsing further encapsulations.
func parseIPv4(b []byte) (Layer, layerParser) {
h := header.IPv4(b)
- hdrLen := h.HeaderLength()
- // Even if there are no options, we set an empty options field instead of nil
- // so that the decision to compare is up to the caller of that comparison.
- var options header.IPv4Options
- if hdrLen > header.IPv4MinimumSize {
- options = append(options, h.Options()...)
- }
+ options := h.Options()
tos, _ := h.TOS()
ipv4 := IPv4{
IHL: Uint8(h.HeaderLength()),