Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3165806ybl; Mon, 19 Aug 2019 13:23:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSExxZ/JUSn/sotGMd01VipUqo0r7DZlRq777Xapl0oGrw8j2pk2ih4i0xT+V9bo7N1q5q X-Received: by 2002:a17:90a:2ecb:: with SMTP id h11mr15535719pjs.108.1566246200173; Mon, 19 Aug 2019 13:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566246200; cv=none; d=google.com; s=arc-20160816; b=grgt6eQx9XfPn+zriqNIifL4tPLPFF6zFY2nesejNwbTi/aeI6e0Xo/y5Aj5zzLK7a cOU+0L1ndw81BBql81Ue4ceablGeg9mWIQDgxsx2f7vgbpo0hKfCxUeMaeF0JuTUgbQe Z2EcRjEAMC4o1ot36s9K1pOeZzNjmMqA2Nq6WQez9N3yYD3QoLX5Ig6rap9v8kduL5Hu YG2AHGU/JnNZRko1TrcuOSUf5PjTmqie6XXUbyZePRhBoEH5V5xtmbGqvzWuZipV4P1Z i5J+npXgKu9OuLLVRxFQVeorYOvm9/fAChFOAB4XJryUyvVteMW688DBr1iJSlqWU0o/ iCyA== 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=RpCAzbsj91LJ3WU2IHCS8gG+X3A/yAv7qHkcdXqWKro=; b=aH0bLujqw+kbMxX1xyDFwato0+0xtUPL4wu+mXizAlTJxkwuQubYEmPuyE/tyT0WML X0apAcEWAZg/lSLqwj3RQx4/uL0PXWyeCpRckSLyXdmgPSYNWM3ae958ZiSsKhuaBx9Z YPJWig8ufWTlTpVZPCp8xTiQIIxCbgqdymnogL9YShFtHQwE8pqoiizgm9GinpxghyUh 8JRf6sN7cmqzd9H3CGyYMrxxdJUHyaLaB0Svmuxe7xSTz6LPfvNBV1dS2GNlu2K4+GGI hihuHWhvI5PZtwIxYbM/jiHAvIoD8j3JWREk2FjsH5/NiCj2+d722yPFEKVBqZFWCyje 5DZQ== 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 67si11329245pfv.74.2019.08.19.13.23.05; Mon, 19 Aug 2019 13:23:20 -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 S1728177AbfHSUV7 (ORCPT + 99 others); Mon, 19 Aug 2019 16:21:59 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:47548 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728136AbfHSUV7 (ORCPT ); Mon, 19 Aug 2019 16:21:59 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hzoA8-00042J-L6; Mon, 19 Aug 2019 22:21:56 +0200 Message-ID: Subject: Re: Implementing Mikrotik IE From: Johannes Berg To: Josef Miegl Cc: Sebastian Gottschall , linux-wireless Date: Mon, 19 Aug 2019 22:21:55 +0200 In-Reply-To: <20190819113706.ujsz67sxcwt2ulmt@pepin-laptop.localdomain> 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> 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 Mon, 2019-08-19 at 13:37 +0200, Josef Miegl wrote: > On Mon, Aug 19, 2019 at 12:12:43PM +0200, Johannes Berg wrote: > > Contrary to what Sebastian states, it certainly is possible today, > > although not through wpa_supplicant's config file, only through the > > wpa_cli interface, using the VENDOR_ELEM_ADD command. There are various > > tests showing how to use this. > > Thanks Johannes. I noticed this too and tried adding a config file > option (OpenWRT doesn't compile wpa_supplicant with wpa_cli). I've added > sta_vendor_elements option (exactly like ap_vendor_elements). This is > the code setting vendor_elem: > > +++ b/wpa_supplicant/wpa_supplicant.c > @@ -5833,6 +5833,16 @@ > wpas_mbo_update_non_pref_chan(wpa_s, wpa_s->conf->non_pref_chan); > #endif /* CONFIG_MBO */ > > + if (wpa_s->conf->sta_vendor_elements) { > + if (wpa_s->vendor_elem[VENDOR_ELEM_ASSOC_REQ] == NULL) { > + wpa_s->vendor_elem[VENDOR_ELEM_ASSOC_REQ] = wpa_s->conf->sta_vendor_elements; > + } else { > + wpabuf_resize(&wpa_s->vendor_elem[VENDOR_ELEM_ASSOC_REQ], wpabuf_len(wpa_s->conf->sta_vendor_elements)); > + wpabuf_put_buf(wpa_s->vendor_elem[VENDOR_ELEM_ASSOC_REQ], wpa_s->conf->sta_vendor_elements); > + } > + } > + > wpa_supplicant_set_default_scan_ies(wpa_s); > > return 0; > > > But when I actually set sta_vendor_elements to something, all it does is > failing the 4-way handshake during association. The IE is perfectly > valid and it works with ap_vendor_elements, no nl80211 malformed IEs > error either. Am I missing something? I don't know, try capturing over the air? Perhaps the vendor IEs added this way are added *first* before all the RSN IEs, and that's tripping up your AP, and you'd have to add them *after* the normal elements? Not really sure where/how they're added? johannes