wpa_supplicant: wired driver

Jouni Malinen jkmaline
Mon Sep 19 19:59:51 PDT 2005


On Mon, Sep 19, 2005 at 03:46:58PM +0200, Edgar E. Iglesias wrote:

> Linux will drop the multicast memberships when the sockets that added them are
> not around anymore. We need to keep the pf-socket alive as long as we have 
> active memberships. The BSD ioctl's are ok in CVS.

Thanks! I noticed that 'ip maddr' did not include the new address and
drop membership in the end was failing, but I was just too lazy to look
at what was causing this yesterday..

> This patch fixes the issue on linux.

Well, almost ;-). This works around it by making sure we always end up
using SIOCADDMULTI..

> +#ifdef __linux__
> +	if (drv->pf_sock == -1) {
> +		drv->pf_sock = socket(PF_PACKET, SOCK_DGRAM, 0);

I removed that if statement which was always false due to drv structure
being zeroed just couple of lines above this piece of code.. This fixed
the problem and rest of the patch was fine and made the address adding
work fine with PACKET_ADD_MEMBERSHIP. This is in CVS now.

-- 
Jouni Malinen                                            PGP id EFC895FA




More information about the Hostap mailing list