From 06b5940d020ee01cfd4319cbcdc773ae32cbf3cd Mon Sep 17 00:00:00 2001 From: pi-rho Date: Sun, 3 Mar 2013 11:45:39 -0600 Subject: [PATCH] Dispatch should ignore non-ip frames --- netarch/ip.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/netarch/ip.py b/netarch/ip.py index 56182c8..24a635f 100644 --- a/netarch/ip.py +++ b/netarch/ip.py @@ -531,12 +531,13 @@ class Dispatch(object): if not self.last: self.last = (filename, pos) frame = Frame(f, pc.linktype) - if frame.hash not in self.sessions: - self.sessions[frame.hash] = self._get_sequencer(frame.protocol) - ret = self.sessions[frame.hash].handle(frame) - if ret: - yield frame.hash, ret - self.last = None + if frame.protocol: + if frame.hash not in self.sessions: + self.sessions[frame.hash] = self._get_sequencer(frame.protocol) + ret = self.sessions[frame.hash].handle(frame) + if ret: + yield frame.hash, ret + self.last = None self._read(pc, filename, fd)