From e6311557fe9b5bcdac42575f822c5d8f4fc4616c Mon Sep 17 00:00:00 2001 From: Rahul Rahul Date: Wed, 2 Nov 2016 14:29:18 -0700 Subject: [PATCH] device: set mfp and group mgmt cipher if AP supports it --- src/device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/device.c b/src/device.c index fd290beb..8d11e242 100644 --- a/src/device.c +++ b/src/device.c @@ -673,6 +673,14 @@ void device_connect_network(struct device *device, struct network *network, bss_info.pairwise_ciphers); info.group_cipher = wiphy_select_cipher(wiphy, bss_info.group_cipher); + info.group_management_cipher = wiphy_select_cipher(wiphy, + bss_info.group_management_cipher); + + if (info.group_management_cipher == 0 && bss_info.mfpr) { + l_dbus_send(dbus, dbus_error_not_supported(message)); + return; + } else if (info.group_management_cipher != 0) + info.mfpc = true; /* RSN takes priority */ if (bss->rsne) {