diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-07-31 18:34:54 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-31 18:34:54 +0000 |
commit | b9944d9aab7aa0ec3ecf8d2048cc42033c06d368 (patch) | |
tree | 44da9aa7d7519df7e573ddf9648023d0fe62d188 | |
parent | 4df618ed749faf440076e21cde3f88b00e8b11bc (diff) | |
parent | 12c4eb294a43f4a84a789871730869d164ef52c9 (diff) |
Merge 12c4eb29 (automated)
-rwxr-xr-x | pkg/sentry/platform/ring0/defs_impl.go | 5 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv4/icmp.go | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/platform/ring0/defs_impl.go b/pkg/sentry/platform/ring0/defs_impl.go index acae012dc..5032ac56e 100755 --- a/pkg/sentry/platform/ring0/defs_impl.go +++ b/pkg/sentry/platform/ring0/defs_impl.go @@ -3,12 +3,11 @@ package ring0 import ( "fmt" "gvisor.dev/gvisor/pkg/cpuid" + "gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables" + "gvisor.dev/gvisor/pkg/sentry/usermem" "io" "reflect" "syscall" - - "gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables" - "gvisor.dev/gvisor/pkg/sentry/usermem" ) var ( diff --git a/pkg/tcpip/network/ipv4/icmp.go b/pkg/tcpip/network/ipv4/icmp.go index fbef6947d..497164cbb 100644 --- a/pkg/tcpip/network/ipv4/icmp.go +++ b/pkg/tcpip/network/ipv4/icmp.go @@ -94,6 +94,7 @@ func (e *endpoint) handleICMP(r *stack.Route, netHeader buffer.View, vv buffer.V pkt := header.ICMPv4(hdr.Prepend(header.ICMPv4MinimumSize)) copy(pkt, h) pkt.SetType(header.ICMPv4EchoReply) + pkt.SetChecksum(0) pkt.SetChecksum(^header.Checksum(pkt, header.ChecksumVV(vv, 0))) sent := stats.ICMP.V4PacketsSent if err := r.WritePacket(nil /* gso */, hdr, vv, header.ICMPv4ProtocolNumber, r.DefaultTTL()); err != nil { |