From patchwork Thu Jan 25 15:13:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 10184193 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ADD9560388 for ; Thu, 25 Jan 2018 15:14:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8636428A2E for ; Thu, 25 Jan 2018 15:14:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 791C228A38; Thu, 25 Jan 2018 15:14:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE72728A2E for ; Thu, 25 Jan 2018 15:14:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbeAYPOm (ORCPT ); Thu, 25 Jan 2018 10:14:42 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:11453 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751775AbeAYPOk (ORCPT ); Thu, 25 Jan 2018 10:14:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1516893281; x=1548429281; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=o8bJk/3khbc4uxQB7yHlS16ZlkImFlJJ4Fd3xj1HkL4=; b=PEQ+Y9/9ledGh1Zk2B/MpZISADUt0P/E/whD60s13D1I1V45sKABH5Yz HUX1CiK3l/hUknssMzY9TGx9y1V+U3bWnTua0RNqSZhSjLlE+5Zz/cRNo RvKWD7rAMH5VVvP5KBy4o5TY6NfV903w/4tqAjbH4maz21ACrruAw1WtK U=; X-IronPort-AV: E=Sophos;i="5.46,412,1511856000"; d="scan'208";a="13686951" Received: from ironmsg-sd-alpha.qualcomm.com ([10.53.140.30]) by alexa-out.qualcomm.com with ESMTP; 25 Jan 2018 07:14:40 -0800 X-IronPort-AV: E=McAfee;i="5900,7806,8784"; a="63475793" X-MGA-submission: =?us-ascii?q?MDE6kt0g/zZ8srghLrzgmJ+85/fnkaZQJJQd1R?= =?us-ascii?q?NiA8FAVbulyhmrTwmX0+ESJx0ylOTZSbswnId4CTv7odSfW6RthS8P+f?= =?us-ascii?q?u6JNUdRrl417aVU/3FxtsrLIoY8Q9fAzj6lgfvXwo2xgG9TJtFbvzKa0?= =?us-ascii?q?Zg?= Received: from nasanexm01f.na.qualcomm.com ([10.85.0.32]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 25 Jan 2018 07:14:40 -0800 Received: from euamsexm01e.eu.qualcomm.com (10.251.127.42) by NASANEXM01F.na.qualcomm.com (10.85.0.32) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 25 Jan 2018 07:14:39 -0800 Received: from jouni.qca.qualcomm.com (10.251.52.12) by euamsexm01e.eu.qualcomm.com (10.251.127.42) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 25 Jan 2018 16:14:35 +0100 From: Jouni Malinen To: Johannes Berg CC: , Srinivas Dasari , Jouni Malinen Subject: [PATCH v3 3/3] nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT Date: Thu, 25 Jan 2018 17:13:39 +0200 Message-ID: <1516893219-30243-3-git-send-email-jouni@qca.qualcomm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516893219-30243-1-git-send-email-jouni@qca.qualcomm.com> References: <1516893219-30243-1-git-send-email-jouni@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.251.52.12] X-ClientProxiedBy: euamsexm01e.eu.qualcomm.com (10.251.127.42) To euamsexm01e.eu.qualcomm.com (10.251.127.42) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Dasari This commit allows SAE Authentication for NL80211_CMD_CONNECT interface, provided host driver advertises the support. Host drivers offload the SAE authentication to user space through NL80211_CMD_EXTERNAL_AUTH interface and thus expect the user space to advertise support to handle offload through NL80211_ATTR_EXTERNAL_AUTH_SUPPORT in NL80211_CMD_CONNECT request. Such drivers should reject the connect request on no offload support from user space. Signed-off-by: Srinivas Dasari Signed-off-by: Jouni Malinen --- net/wireless/nl80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) v3: - clarified commit message to cover NL80211_ATTR_EXTERNAL_AUTH_SUPPORT in NL80211_CMD_CONNECT and potential need to reject the command with missing support diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 8b10598..7478a6d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3918,9 +3918,10 @@ static bool nl80211_valid_auth_type(struct cfg80211_registered_device *rdev, return false; return true; case NL80211_CMD_CONNECT: - /* SAE not supported yet */ - if (auth_type == NL80211_AUTHTYPE_SAE) + if (!(rdev->wiphy.features & NL80211_FEATURE_SAE) && + auth_type == NL80211_AUTHTYPE_SAE) return false; + /* FILS with SK PFS or PK not supported yet */ if (auth_type == NL80211_AUTHTYPE_FILS_SK_PFS || auth_type == NL80211_AUTHTYPE_FILS_PK)