Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp311398ybl; Fri, 23 Aug 2019 01:00:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4ffosnvD4S/IlQdusqzx55Q5JUyNW3fYVaOPfyJS4KcOAwPLwNSM68KlfPHEy80R28rhI X-Received: by 2002:a17:90a:e983:: with SMTP id v3mr3739914pjy.81.1566547203801; Fri, 23 Aug 2019 01:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566547203; cv=none; d=google.com; s=arc-20160816; b=ehFFyFM3p18k7HwHS1IUmLOHuaXBREy/Ms1w4E9EHQfSijD3ovKWZsW6BTTfg12CA8 G+3r9K8ArePuIKh0b/RnVlDIpljkVivCjCZeaXChiQwNr+qyv/TMYN1+qjhv6kT1DR6g TkQ9T/GyOH7JvV1/PaHPjDvxXqmksPnQWoSiJOiVc22kUKZr7GCUfRBGCOk1Fj9HBT3R Inr/lPEUEuZ3Q5ySl+C/4JNBLiTtVvLfkDIqaG8cj0oxH7JuzOBrMTi17qzu3cmQPOZE jlQVgX7dmzbfXADo5OBma3MGUgK29+bVRGiTlOHlPCtaJ1OYnnbShHztLS+dsabi9765 qnvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=8CJ6Cd4kwZnGYeuotF7nbLKhfjm9wnFfCYeyY2b8zEg=; b=KJ/KAUc9Ob5n/CpjZl25E2nm9EynuP5ceXRdzfcilhfo1HUk3pzlqRxKzTbD1gsGO/ vFanQJBy9GKRR189sdlJEJxqdz/6z0dZxrL1X0jaWVj7tVEPL7fB/DaKjCpHKrd+ACmW wY48ulYJjJLBsW3SXOBP0bJPrr6ezCCR05/+WUyLVLX1mpzmGCwpc61gEIVxdsi6cDqy Ab+ZB1ySnK2tu86L3/q+aiUoHSBfWCg0QM9v+kKnt8yB+6evNQM9I7I7bioHQ5WHO1Vx KWAMF2XZRGSFYrZeyPM6s7MeaglKI8p+OsB7gR5YwPusU1E/+vTmnMATJnIfvkVFRzwi Vz3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si1825298plc.305.2019.08.23.00.59.49; Fri, 23 Aug 2019 01:00:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733140AbfHVUIS (ORCPT + 99 others); Thu, 22 Aug 2019 16:08:18 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:40936 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbfHVUIS (ORCPT ); Thu, 22 Aug 2019 16:08:18 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i0tNY-00089b-2B; Thu, 22 Aug 2019 22:08:16 +0200 Message-ID: <0452a0cbb36bcffa8371a58dfd931864c1f79eef.camel@sipsolutions.net> Subject: Re: Implementing Mikrotik IE From: Johannes Berg To: Josef Miegl Cc: Sebastian Gottschall , linux-wireless Date: Thu, 22 Aug 2019 22:08:13 +0200 In-Reply-To: <5ee160209eb1f9e70f6224c393389266280d7d80.camel@sipsolutions.net> (sfid-20190822_090033_537095_4B41631C) References: <20190815152844.k5mmddvbwrohkzr6@pepin-laptop.localdomain> <3a079683-6f57-3b42-f909-90c46e14f14f@newmedia-net.de> <20190816111044.4ntizgmpa3twbzcg@pepin-laptop.localdomain> <20190816113818.ohktykc4fyetzyvq@pepin-laptop.localdomain> <9985fddfb059640f36665efc9c1ef2dc0bdb7662.camel@sipsolutions.net> <20190819113706.ujsz67sxcwt2ulmt@pepin-laptop.localdomain> <6efb9b56c77cd9ea945f89c3371b49c301dc2b4e.camel@sipsolutions.net> <58A25955-2A17-4DE7-82FB-3B20E00C96EC@miegl.cz> <5ee160209eb1f9e70f6224c393389266280d7d80.camel@sipsolutions.net> (sfid-20190822_090033_537095_4B41631C) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2019-08-22 at 09:00 +0200, Johannes Berg wrote: > > Perhaps it expects the 4-way-HS to already be in 4-addr frame format, or > something else special in the 4-way-HS if you have WDS? I think this is actually the right guess. The working capture you sent me has the EAPOL 2/4 in a 4-addr frame: ToDS=1, FromDS=1 A1/RA = AP A2/TA = STA A3/DA = AP A4/SA = STA The non-working capture has the EAPOL 2/4 in 3-addr format, as you'd expect in the Linux 4-addr AP/STA case: ToDS=1, FromDS=0 A1/RA = AP A2/TA,SA = STA A3/DA = AP Since it's basically ignoring the message 2 (it just says "handshake timed out" later) it's almost certainly expecting *only* the 4-addr format. As a hack, you could do --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2623,8 +2623,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); memcpy(hdr.addr3, sdata->u.mgd.bssid, ETH_ALEN); hdrlen = 24; - } else if (sdata->u.mgd.use_4addr && - cpu_to_be16(ethertype) != sdata->control_port_protocol) { + } else if (sdata->u.mgd.use_4addr) { fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); /* RA TA DA SA */ in mac80211, then it should send 4-addr frames even for EAPOL. johannes