summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/arp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-20 14:31:12 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-20 14:31:12 -0700
commit07b1b4cc98552a7d45d673ce1e4d1222bbffca7d (patch)
tree0c09a287bf7c712e315e2dd2a49b8785054de986 /pkg/tcpip/network/arp
parent470633d7e916e7956f4ebd75559f92cf12067cbf (diff)
parenta551add5d8a5bf631cd9859c761e579fdb33ec82 (diff)
Merge pull request #2313 from kevinGC:firstn
PiperOrigin-RevId: 307477185
Diffstat (limited to 'pkg/tcpip/network/arp')
-rw-r--r--pkg/tcpip/network/arp/arp.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/network/arp/arp.go b/pkg/tcpip/network/arp/arp.go
index 7acbfa0a8..cf73a939e 100644
--- a/pkg/tcpip/network/arp/arp.go
+++ b/pkg/tcpip/network/arp/arp.go
@@ -93,7 +93,10 @@ func (e *endpoint) WriteHeaderIncludedPacket(r *stack.Route, pkt stack.PacketBuf
}
func (e *endpoint) HandlePacket(r *stack.Route, pkt stack.PacketBuffer) {
- v := pkt.Data.First()
+ v, ok := pkt.Data.PullUp(header.ARPSize)
+ if !ok {
+ return
+ }
h := header.ARP(v)
if !h.IsValid() {
return