[PATCH] dbus: Change WPA/RSNIE byte array props to dicts

Witold Sowa witold.sowa
Fri Jan 15 05:32:20 PST 2010


Marcel Holtmann pisze:
>> Here's the patch again with following changes:
>> - added KeyMgmt values: wpa-psk/eap-sha256 and wpa-ft-psk/eap
>> - changed none to wpa-none key management in WPA dict.
>> - removed none key management from RSC disct
>> - added MgmtGroup entry to RSN dict
> 
> that looks all pretty good.
>>  
>> +	if ((old->ie_len == new->ie_len) ||
>> +	     os_memcmp(old + 1, new + 1, old->ie_len) == 0)
>> +		return changes;
>> +	else
>> +		changes |= WPA_BSS_IES_CHANGED_FLAG;
>> +
> 
At first, I've noticed a bug in the condition, the should be AND instead
of OR. Jouni, please correct this before applying.

> Why do you bother an else branch here? It just make the code harder to
> read.
> 
The else branch is for case that IEs has changed. There is an
appropriate flag set and after the else statement the WPA/RSN/WPS IEs
are checked for changes.

> Also the extra ( ) around the first check are not really needed.
> 
> The rest looks fine to me. So I am okay with having this merged.
> 
Yeah, extra brackets can be removed.

Thanks,
Witek.



More information about the Hostap mailing list