From 1cd0056ada373b64cef3e27e688e1dd8ec820d3b Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 20 Feb 2019 16:08:37 -0800 Subject: [PATCH] Added argument checks to VirtualTap::put() --- src/VirtualTap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/VirtualTap.cpp b/src/VirtualTap.cpp index 58eba34..81b2a94 100644 --- a/src/VirtualTap.cpp +++ b/src/VirtualTap.cpp @@ -194,7 +194,9 @@ std::vector VirtualTap::ips() const void VirtualTap::put(const MAC &from,const MAC &to,unsigned int etherType, const void *data,unsigned int len) { - lwip_eth_rx(this, from, to, etherType, data, len); + if (len <= _mtu && _enabled) { + lwip_eth_rx(this, from, to, etherType, data, len); + } } std::string VirtualTap::deviceName() const