mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 10:54:03 -05:00
P2P: Fix D-Bus persistent parameter in group started event
wpas_p2p_persistent_group() returns non-zero for persistent groups. This value happens to be 2 instead of 1 due to the P2P_GROUP_CAPAB_PERSISTENT_GROUP value. This ended up with D-Bus code trying to encode 2 as a DBUS_TYPE_BOOLEAN value which results in an assert from the library. Fix this by modifying wpas_p2p_persistent_group() to return 0 or 1 instead of 0 or an arbitrary non-zero. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
cc9985d1b1
commit
112fdee738
@ -1076,7 +1076,7 @@ static int wpas_p2p_persistent_group(struct wpa_supplicant *wpa_s,
|
||||
"go_dev_addr=" MACSTR,
|
||||
MAC2STR(bssid), group_capab, MAC2STR(go_dev_addr));
|
||||
|
||||
return group_capab & P2P_GROUP_CAPAB_PERSISTENT_GROUP;
|
||||
return !!(group_capab & P2P_GROUP_CAPAB_PERSISTENT_GROUP);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user