Commit 3ce41605 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Make ethernet frames 60 bytes for those drivers that actually checks

ethernet frame length.
parent bcd3a834
......@@ -31,6 +31,8 @@ class ETH(object):
u = random.uniform(0, 1.0)
if u >= self.send_loss:
data = data[0:6] + self.macaddr + data[12:]
if len(data) < 60:
data = data.ljust(60, '\0')
self.socket.send(data)
else:
logger.log('Dropped sent packet')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment