* parts taken from aircrack-ng, parts changend.
*/
#include "gnunet_config.h"
+#define SOCKTYPE int
+#define FDTYPE int
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/types.h>
if (PRISM_STATUS_OK == pv.status)
{
ri->ri_noise = pv.data;
- got_noise = 1;
+ /* got_noise = 1; */
}
break;
case PRISM_DID_RATE:
if (PRISM_STATUS_OK == pv.status)
{
ri->ri_power = pv.data;
- got_signal = 1;
+ /* got_signal = 1; */
}
break;
}
mac_test (const struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader,
const struct HardwareInfos *dev)
{
+ static struct GNUNET_TRANSPORT_WLAN_MacAddress all_zeros;
+
+ if ( (0 == memcmp (&taIeeeHeader->addr3, &all_zeros, MAC_ADDR_SIZE)) ||
+ (0 == memcmp (&taIeeeHeader->addr1, &all_zeros, MAC_ADDR_SIZE)) )
+ return 0; /* some drivers set no Macs, then assume it is all for us! */
+
if (0 != memcmp (&taIeeeHeader->addr3, &mac_bssid_gnunet, MAC_ADDR_SIZE))
return 1; /* not a GNUnet ad-hoc package */
if ( (0 == memcmp (&taIeeeHeader->addr1, &dev->pl_mac, MAC_ADDR_SIZE)) ||