title: the filter of sniff function in scapy does not work properly
body: <p>It seems that the <code>filter</code> of <code>sniff</code> function does not work properly.</p>
  
  <p>I m executing the sniff with the following filter</p>
  
  <pre><code>a=sniff(count=1,filter="tcp and host 192.168.10.55 and port 14010")
  </code></pre>
  
  <p>But some time the <code>sniff</code> catch an <code>UDP</code> packet like this:</p>
  
  <pre><code>&gt;&gt;&gt; a=sniff(count=1,filter="tcp and host 192.168.10.55 and port 14010")
  &gt;&gt;&gt; a
  &lt;Sniffed: TCP:0 UDP:1 ICMP:0 Other:0&gt;
  </code></pre>
  
  <p>And some time the <code>sniff</code> catch a TCP packet with wrong ports:</p>
  
  <pre><code>&gt;&gt;&gt; a=sniff(count=1,filter="tcp and host 192.168.10.55 and port 14010")
  &gt;&gt;&gt; a
  &lt;Sniffed: TCP:1 UDP:0 ICMP:0 Other:0&gt;
  &gt;&gt;&gt; a[0]
  &lt;Ether  dst=00:26:55:cb:3b:10 src=00:22:64:55:c8:89 type=0x800 |&lt;IP  version=4L ihl=5L tos=0x10 len=92 id=8683 flags=DF frag=0L ttl=64 proto=tcp chksum=0x9484 src=192.168.1.71 dst=192.168.1.133 options=[] |&lt;TCP  sport=ssh dport=1874 seq=350107599 ack=2484345720 dataofs=5L reserved=0L flags=PA window=254 chksum=0x846b urgptr=0 options=[] |&lt;Raw  load="yn\x01\x9d\xfca\xc9V-8\x18|\xc4\t\xf1\xc4\xd8\xd3\xc6\x95E\x19'h\xc0\x89\xf1\x08g\xa3\x9a\xa9\xf51RF\xc2\x1f\xe5a\xac\x83M\xc9\x0b\x80\x85\x1b\xcf\xb6f\xcc" |&gt;&gt;&gt;&gt;
  </code></pre>
  
  <p>And some time the <code>sniff</code> catch an <code>ARP</code> packet like this:</p>
  
  <pre><code>&gt;&gt;&gt; a=sniff(count=1,filter="tcp and host 192.168.10.55 and port 14010")
  &gt;&gt;&gt; a
  &lt;Sniffed: TCP:0 UDP:0 ICMP:0 Other:1&gt;
  &gt;&gt;&gt; a[0]
  &lt;Ether  dst=ff:ff:ff:ff:ff:ff src=00:22:07:2c:53:97 type=0x806 |&lt;ARP  hwtype=0x1 ptype=0x800 hwlen=6 plen=4 op=who-has hwsrc=00:22:07:2c:53:97 psrc=192.168.1.178 hwdst=ff:ff:ff:ff:ff:ff pdst=192.168.1.179 |&lt;Padding  load='\x00\x07\x00\x00\x00\x00\x00\x00p\x00\x00\x00\x00\x00\x01\x14\x00\x00' |&gt;&gt;&gt;
  </code></pre>
  
  <p>Am I missing something in my filter? How I can avoid this problem?</p>