summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/arp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-02-06 00:52:28 +0000
committergVisor bot <gvisor-bot@google.com>2021-02-06 00:52:28 +0000
commitf01915a93252ed68960af68d736ed0d48d891b6c (patch)
tree3b184ee34b9de3c440da9ad25f0b462448274165 /pkg/tcpip/network/arp
parente4757db6aba9a4fbc6beacbcea8bf14bfd9a230c (diff)
parent24416032ab848cff7696b3f37e4c18220aeee2c0 (diff)
Merge release-20210125.0-87-g24416032a (automated)
Diffstat (limited to 'pkg/tcpip/network/arp')
-rw-r--r--pkg/tcpip/network/arp/arp.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/tcpip/network/arp/arp.go b/pkg/tcpip/network/arp/arp.go
index 0d7fadc31..bd9b9c020 100644
--- a/pkg/tcpip/network/arp/arp.go
+++ b/pkg/tcpip/network/arp/arp.go
@@ -129,6 +129,11 @@ func (e *endpoint) HandlePacket(pkt *stack.PacketBuffer) {
return
}
+ if _, _, ok := e.protocol.Parse(pkt); !ok {
+ stats.malformedPacketsReceived.Increment()
+ return
+ }
+
h := header.ARP(pkt.NetworkHeader().View())
if !h.IsValid() {
stats.malformedPacketsReceived.Increment()