Remove Interface.close, rename script argument
[csit.git] / resources / libraries / python / PacketVerifier.py
index 566ea95..9af14e3 100644 (file)
@@ -232,6 +232,7 @@ class RxQueue(PacketVerifier):
             return None
 
         pkt = self._sock.recv(0x7fff)
+        pkt_pad = auto_pad(pkt)
         print 'Received packet on {0} of len {1}'.format(self._ifname, len(pkt))
         Ether(pkt).show2()
         print
@@ -241,7 +242,7 @@ class RxQueue(PacketVerifier):
                 # Auto pad all packets in ignore list
                 ignore[i] = auto_pad(ig_pkt)
             for ig_pkt in ignore:
-                if ig_pkt == pkt:
+                if ig_pkt == pkt_pad:
                     # Found the packet in ignore list, get another one
                     # TODO: subtract timeout - time_spent in here
                     ignore.remove(ig_pkt)
@@ -290,10 +291,6 @@ class Interface(object):
     def recv_pkt(self, timeout=3):
         return self.rxq.recv(timeout, self.sent_packets)
 
-    def close(self):
-        #self.rxq._proc.terminate()
-        pass
-
 
 def create_gratuitous_arp_request(src_mac, src_ip):
     """Creates scapy representation of gratuitous ARP request"""