summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/lib/packet/packet.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
index 043dae75..7de24c18 100644
--- a/ryu/lib/packet/packet.py
+++ b/ryu/lib/packet/packet.py
@@ -69,6 +69,9 @@ class Packet(StringifyMixin):
def _parser(self, cls):
rest_data = self.data
while cls:
+ # Ignores an empty buffer
+ if not six.binary_type(rest_data).strip(b'\x00'):
+ break
try:
proto, cls, rest_data = cls.parser(rest_data)
except struct.error: