From patchwork Mon Jun 25 06:32:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoni Divinsky X-Patchwork-Id: 166942 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 60139B6FAF for ; Mon, 25 Jun 2012 16:37:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CFEA89D270; Mon, 25 Jun 2012 02:37:47 -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 m9BDdw2hcYuy; Mon, 25 Jun 2012 02:37:47 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id DA35A9D255; Mon, 25 Jun 2012 02:37:36 -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 ABAD19D255 for ; Mon, 25 Jun 2012 02:37:35 -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 mhLBj2d2yZqD for ; Mon, 25 Jun 2012 02:37:31 -0400 (EDT) Received: from na3sys009aog117.obsmtp.com (na3sys009aog117.obsmtp.com [74.125.149.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 775609D23F for ; Mon, 25 Jun 2012 02:37:31 -0400 (EDT) Received: from mail-ob0-f172.google.com ([209.85.214.172]) (using TLSv1) by na3sys009aob117.postini.com ([74.125.148.12]) with SMTP ID DSNKT+gHKrvVYTZZlB9IuxeZSBURL/R/fqgu@postini.com; Sun, 24 Jun 2012 23:37:31 PDT Received: by obbwc20 with SMTP id wc20so8478013obb.17 for ; Sun, 24 Jun 2012 23:37:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=4kSguZCe6SI2DyznhhAxcCWTT2p1ZdOc9KEaHegRiLw=; b=Ury5n1yXgNiNPAjb+95fqOX+FmSG5dk+pKZBTCI8eBTahd3vNXhFZu+WBJ2Mbwh52g XuFlZ0MQqktJaQpmupc7iOJ8DUKfInCO1n4yewmZ9WdkGYnMyBtLnVSwiqFRoEfS5EUZ ubZNK3Gb7kuheZIOkrK87LaUM4pp7Vu0sTcCkpdla8Rs8ADcmF643p914LXrleaZneg8 uhUMedzo+aUqA7tVH/lP+D0tcBT1Vse67Zj+09nrRfTBNGsRkUU4bgbQF4kJ/5SnFsiG u8M/XUVvkcQHnEruMjUeErVvI6dPGWJ75NIpIdZpn0EsB1g5c6IKZB15nfzNosSjFjSf ltMg== Received: by 10.60.20.233 with SMTP id q9mr11149347oee.57.1340606249785; Sun, 24 Jun 2012 23:37:29 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id n9sm24840559oen.2.2012.06.24.23.37.28 (version=SSLv3 cipher=OTHER); Sun, 24 Jun 2012 23:37:29 -0700 (PDT) From: Yoni Divinsky To: hostap@lists.shmoo.com Subject: [PATCH] hostapd: fix pbc config method of WSC IE in beacon Date: Mon, 25 Jun 2012 09:32:04 +0300 Message-Id: <1340605924-12832-1-git-send-email-yoni.divinsky@ti.com> X-Mailer: git-send-email 1.7.0.4 X-Gm-Message-State: ALoCoQl+iDbFmbd7phoxYyxMQVOKILDo27VaO7BzyyLw8PmdPBCTAbRN7tFF6hckJZh4rEPwXRNw 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: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com In softAP which supports WPSv2 with only virtual push button, when PBC is called, the WSC IE should include selected Registrar Configuration Methods attribute with the bit of the physical push button no set. Signed-hostap: Yoni Divinsky --- src/wps/wps_registrar.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index e6ec04c..3b53ce8 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -480,9 +480,11 @@ static void wps_set_pushbutton(u16 *methods, u16 conf_methods) { *methods |= WPS_CONFIG_PUSHBUTTON; #ifdef CONFIG_WPS2 - if (conf_methods & WPS_CONFIG_VIRT_PUSHBUTTON) + if ((conf_methods & WPS_CONFIG_VIRT_PUSHBUTTON) == + WPS_CONFIG_VIRT_PUSHBUTTON) *methods |= WPS_CONFIG_VIRT_PUSHBUTTON; - if (conf_methods & WPS_CONFIG_PHY_PUSHBUTTON) + if ((conf_methods & WPS_CONFIG_PHY_PUSHBUTTON) == + WPS_CONFIG_PHY_PUSHBUTTON) *methods |= WPS_CONFIG_PHY_PUSHBUTTON; if (!(*methods & (WPS_CONFIG_VIRT_PUSHBUTTON | WPS_CONFIG_PHY_PUSHBUTTON))) {