title: Packet socket in promiscuous mode only receiving local traffic
body: <p>I have a socket created with <code>socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))</code>, and I've set it into promiscuous mode using:</p>
  
  <pre><code>struct ifreq ifr;
  strncpy((char*)ifr.ifr_name, interface, IF_NAMESIZE);
  if(ioctl(sock, SIOCGIFINDEX, &amp;ifr)&lt;0) fail(2);
  
  struct packet_mreq mr;
  memset(&amp;mr, 0, sizeof(mr));
  mr.mr_ifindex = ifr.ifr_ifindex;
  mr.mr_type = PACKET_MR_PROMISC;
  if(setsockopt(sock, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &amp;mr, sizeof(mr)) &lt; 0) fail(2);
  </code></pre>
  
  <p>The problem is that when I do a <code>read()</code> from the socket, it only returns data that's going from or coming to my computer. </p>
  
  <p>How can I get it to read and process all packets on the network?</p>
  
  <p>Wireshark shows all the packets fine, so I know it isn't my computer or NIC. <code>ifconfig</code> reports that it's <code>PROMISC</code> when it is running.</p>