[PATCH] Use SOCK_DGRAM type PF_PACKET socket for Linux
Mon Aug 29 19:58:21 PDT 2005
On Mon, Aug 29, 2005 at 05:58:56PM +0800, Zhu Yi wrote:
> On Sun, 2005-08-28 at 20:16 -0700, Jouni Malinen wrote:
> > the last time I was considering it.. hostapd needs to know the
> > destination address of the RSN pre-authentication frames, not just the
> > source address.
> So the hostapd is working in promiscuous mode?
Yes, it needs to receive pre-authentication packets sent to its BSSID
even if those frames are coming from other interfaces.
> Do you have an easy way to change the socket type without close it first
> in the user space?
No, but that should not be necessary for l2_packet.c. It is ok to close
and re-open the socket at the point when rx_l2_hdr is changed. Or better
yet, l2_packet_init() could be modified to take that parameter in and
l2_packet_set_rx_l2_hdr() would just be removed. There is not really any
need to change this behavior dynamically after the socket has been
opened. This new function was added just to avoid changing existing API,
if I remember correctly. And I have already changed that API... ;-)
Jouni Malinen PGP id EFC895FA
More information about the Hostap