From patchwork Tue Aug 14 05:26:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avinash Patil X-Patchwork-Id: 177162 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 1C3F82C0087 for ; Tue, 14 Aug 2012 15:27:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 947459C234; Tue, 14 Aug 2012 01:27:00 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Da+WjgEpST+R; Tue, 14 Aug 2012 01:27:00 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 7D4679C235; Tue, 14 Aug 2012 01:26:56 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E64209C235 for ; Tue, 14 Aug 2012 01:26:54 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zUhzsZTE3E6O for ; Tue, 14 Aug 2012 01:26:51 -0400 (EDT) Received: from mail-gh0-f172.google.com (mail-gh0-f172.google.com [209.85.160.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 282219C234 for ; Tue, 14 Aug 2012 01:26:51 -0400 (EDT) Received: by ghbg16 with SMTP id g16so1119ghb.17 for ; Mon, 13 Aug 2012 22:26:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.197.70 with SMTP id is6mr21002514pbc.64.1344922010235; Mon, 13 Aug 2012 22:26:50 -0700 (PDT) Received: by 10.68.31.201 with HTTP; Mon, 13 Aug 2012 22:26:50 -0700 (PDT) Date: Tue, 14 Aug 2012 10:56:50 +0530 Message-ID: Subject: [RFC] hostapd: disable WPS when WPA-TKIP configuration is set From: Avinash Patil To: hostap@lists.shmoo.com Cc: j@w1.fi X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com TC4.1.11 from WSC2.0 test plan mandates to disable WPS when AP is configured as WPA-TKIP only. This patches disables WPS if AP configuration is WPA-TKIP. Signed-off-by: Avinash Patil --- hostapd/config_file.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) return 0; diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 03f29ad..ad66744 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -1288,6 +1288,13 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, "disabled"); bss->wps_state = 0; } + if (bss->wps_state && bss->wpa == 1 && + !(bss->wpa_pairwise & WPA_CIPHER_CCMP) && + !(bss->rsn_pairwise & WPA_CIPHER_CCMP)) { + bss->wps_state = 0; + wpa_printf(MSG_INFO, "WPS: WPA-TKIP configuration forced WPS to" + " be disabled"); + } #endif /* CONFIG_WPS2 */