From patchwork Tue Sep 1 14:42:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 512862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2344F14016A for ; Wed, 2 Sep 2015 00:45:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b=bN7Fdb+F; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id B524928C01D; Tue, 1 Sep 2015 16:43:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EB0B628C617 for ; Tue, 1 Sep 2015 16:43:10 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .googlemail. - helo: .mail-wi0-f178.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 1 Sep 2015 16:43:09 +0200 (CEST) Received: by wicjd9 with SMTP id jd9so35823971wic.1 for ; Tue, 01 Sep 2015 07:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=B029Yj85Scm/Z/RCXj0abrUpAOmpqORj8XA6SmcTRNU=; b=bN7Fdb+F+2u6vknVSblSgcm2CDk4NFRCswcAbd+pmYpKomI0c3g0l23g5dOg4w/YtW zv19kbE4CTpp8hKmxlznscuWQc79DyqugyLocb4kvQ25AEwXsdANqTO2zl1zWIfnnJeL nItINgC3DZ/0Ngkl9YPDqrbqI+vb+dWKQBE03KsSbF8gyKgTYj1mdT0kmk6DY4F+URsv B4HDf+SXXwKze94roP4aHVD4fz/i1iGSXXjcoQA7DYC/o0qaLZrLycJbCz5BuAl59zhq B3FK+4S6FIvbjJ0vo2IAhnUzWul/kiUJ6MmBQ7C6452JImS1OBxXBK6nRiLDL7Oxx0/O sI8Q== X-Received: by 10.180.8.9 with SMTP id n9mr3796978wia.40.1441118647879; Tue, 01 Sep 2015 07:44:07 -0700 (PDT) Received: from hschaa-desktop.site (HSI-KBW-217-008-059-040.hsi.kabelbw.de. [217.8.59.40]) by smtp.gmail.com with ESMTPSA id ne7sm3085139wic.12.2015.09.01.07.44.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 07:44:07 -0700 (PDT) From: Helmut Schaa To: openwrt-devel@lists.openwrt.org Date: Tue, 1 Sep 2015 16:42:12 +0200 Message-Id: <1441118532-3271-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.8.4.5 Subject: [OpenWrt-Devel] [PATCH] hostapd: Add eapol_version config option X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Add eapol_version to the openwrt wireless config ssid section. Only eapol_version=1 and 2 will get passed to hostapd, the default in hostapd is 2. This is only useful for really old client devices that don't accept eapol_version=2. Signed-off-by: Helmut Schaa --- package/network/services/hostapd/files/netifd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index d90ff9b..bdfcbb2 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -120,6 +120,7 @@ hostapd_common_add_bss_config() { config_add_boolean rsn_preauth auth_cache config_add_int ieee80211w + config_add_int eapol_version config_add_string 'auth_server:host' 'server:host' config_add_string auth_secret @@ -183,7 +184,7 @@ hostapd_set_bss_options() { wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 \ wps_device_type wps_device_name wps_manufacturer wps_pin \ macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \ - iapp_interface + iapp_interface eapol_version set_default isolate 0 set_default maxassoc 0 @@ -238,6 +239,8 @@ hostapd_set_bss_options() { [ -e "$wpa_psk_file" ] || touch "$wpa_psk_file" append bss_conf "wpa_psk_file=$wpa_psk_file" "$N" } + [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] && append bss_conf "eapol_version=$eapol_version" "$N" + wps_possible=1 append wpa_key_mgmt "WPA-PSK" ;; @@ -297,6 +300,8 @@ hostapd_set_bss_options() { append bss_conf "vlan_file=$vlan_file" "$N" } } + + [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] && append bss_conf "eapol_version=$eapol_version" "$N" ;; wep) local wep_keyidx=0