Added argument checks to VirtualTap::put()

This commit is contained in:
Joseph Henry
2019-02-20 16:08:37 -08:00
parent 23bd427155
commit 1cd0056ada

View File

@@ -194,7 +194,9 @@ std::vector<InetAddress> 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