summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/testbench
diff options
context:
space:
mode:
authorJulian Elischer <jrelis@google.com>2020-11-12 18:36:45 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-12 18:38:43 -0800
commit638d64c6337d05b91f0bde81de8e1c8d6d9908d8 (patch)
treea837ab0ff956aff7d058005059510fa49d1fa89e /test/packetimpact/testbench
parent62db1fad2cb7d2249720e157aa79c84b7531a2e9 (diff)
Change AllocationSize to SizeWithPadding as requested
RELNOTES: n/a PiperOrigin-RevId: 342176296
Diffstat (limited to 'test/packetimpact/testbench')
-rw-r--r--test/packetimpact/testbench/layers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/packetimpact/testbench/layers.go b/test/packetimpact/testbench/layers.go
index 2fb7ca9ba..62473c577 100644
--- a/test/packetimpact/testbench/layers.go
+++ b/test/packetimpact/testbench/layers.go
@@ -298,7 +298,7 @@ func (l *IPv4) ToBytes() ([]byte, error) {
// An IPv4 header is variable length depending on the size of the Options.
hdrLen := header.IPv4MinimumSize
if l.Options != nil {
- hdrLen += l.Options.AllocationSize()
+ hdrLen += l.Options.SizeWithPadding()
if hdrLen > header.IPv4MaximumHeaderSize {
// While ToBytes can be called on packets that were received as well
// as packets locally generated, it is physically impossible for a