summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/header
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-10-10 22:17:27 +0000
committergVisor bot <gvisor-bot@google.com>2019-10-10 22:17:27 +0000
commita738d4999a26215ac154a4144591a23ca1dd2865 (patch)
tree4c0ffc5012422ce0ee65781dc33c8bdf7d1e3203 /pkg/tcpip/header
parentf308139cc31cf69ec33b2649a518bfc7f72f068a (diff)
parentc7e901f47a09eaac56bd4813227edff016fa6bff (diff)
Merge release-20190806.1-262-gc7e901f (automated)
Diffstat (limited to 'pkg/tcpip/header')
-rw-r--r--pkg/tcpip/header/ipv4.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/header/ipv4.go b/pkg/tcpip/header/ipv4.go
index 554632a64..e5360e7c1 100644
--- a/pkg/tcpip/header/ipv4.go
+++ b/pkg/tcpip/header/ipv4.go
@@ -284,7 +284,7 @@ func (b IPv4) IsValid(pktSize int) bool {
hlen := int(b.HeaderLength())
tlen := int(b.TotalLength())
- if hlen > tlen || tlen > pktSize {
+ if hlen < IPv4MinimumSize || hlen > tlen || tlen > pktSize {
return false
}