[PATCH] Use the p2p/hostap interface to send frames if moniter interface is not supported

Jouni Malinen j
Mon Jun 6 03:05:32 PDT 2011

On Jun 1, 2011, at 2:04 AM, Lin Ma wrote:

> In case that monitor interface is not supported, we create a raw socket to send the frames

> +	drv->raw_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
> +	ll.sll_family = AF_PACKET;
> +	ll.sll_ifindex = drv->ifindex;
> +	if (bind(drv->raw_sock, (struct sockaddr *) &ll, sizeof(ll)) < 0) {

Hmm.. So this would be 802.11 frame on the interface that is normally used to send Ethernet frames or am I missing something here? If that is the case, this looks a bit odd. I think it would be better to use the nl80211 commands that are used in station mode rather than trying to define a new way of sending 802.11 management frames in AP mode.

- Jouni

More information about the Hostap mailing list