diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-16 00:07:13 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-16 00:07:13 +0000 |
commit | 5dea8132884123672f9032c8db64fbad4e98a174 (patch) | |
tree | 77c70ec0cc7945f09ff9d84941c863329572ac44 /pkg/tcpip/network/ipv4 | |
parent | 749e21e311b5eece7ced43abfa720d62431d2b18 (diff) | |
parent | f98c3ee32c592417aa84f5c302b9db49f12ba129 (diff) |
Merge release-20190806.1-273-gf98c3ee (automated)
Diffstat (limited to 'pkg/tcpip/network/ipv4')
-rw-r--r-- | pkg/tcpip/network/ipv4/ipv4.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/tcpip/network/ipv4/ipv4.go b/pkg/tcpip/network/ipv4/ipv4.go index df1a08113..5cd895ff0 100644 --- a/pkg/tcpip/network/ipv4/ipv4.go +++ b/pkg/tcpip/network/ipv4/ipv4.go @@ -326,7 +326,13 @@ func (e *endpoint) HandlePacket(r *stack.Route, vv buffer.VectorisedView) { return } var ready bool - vv, ready = e.fragmentation.Process(hash.IPv4FragmentHash(h), h.FragmentOffset(), last, more, vv) + var err error + vv, ready, err = e.fragmentation.Process(hash.IPv4FragmentHash(h), h.FragmentOffset(), last, more, vv) + if err != nil { + r.Stats().IP.MalformedPacketsReceived.Increment() + r.Stats().IP.MalformedFragmentsReceived.Increment() + return + } if !ready { return } |