From patchwork Thu Sep 20 13:06:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Stanislav X-Patchwork-Id: 972420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=uakom.sk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EUM3ZqQY"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42GHCb3Xf5z9s4V for ; Thu, 20 Sep 2018 23:10:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=liDGg0RETCW4xaLHF/AxAObAqxPp83xLy6bkceqcRZk=; b=EUM3ZqQY5/Brix BWNVVq2AwPkQntq4L3za/eHZEwcxSHFFAPrzLSemTSE4zdqjI/VXvul3sKZf3pB8JBS0oyB6n+1Qu /lyKoIlNpqfaoZq5IqZWu7FvwHIccWU0uzzH1nABPyJADv7viEh1pi5O2W+5kM03iaoxkDB5rgEtE QhK0ww6Mx8BnvxEqJ425GvE6MMUCLdbNs9dmfj1zAB6onEHiHaoU9i/H1JHfbf544WSkVY/5G/+dS t6Ai7JIaNBRYZea24es/7tkV+kIwXiThgSXEK6Um6832SnrJRBq/RmHsunvx5FK4m7aatk1S+/Ud5 p/qvLgiXR0/9c2ekeuwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2yif-0001k4-02; Thu, 20 Sep 2018 13:10:09 +0000 Received: from moon.uakom.sk ([192.108.131.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2yey-00008z-Ox for hostap@lists.infradead.org; Thu, 20 Sep 2018 13:08:21 +0000 Received: from moon.uakom.sk (localhost [127.0.0.1]) by moon.uakom.sk (8.14.4/8.14.4) with ESMTP id w8KD61Hp005152 for ; Thu, 20 Sep 2018 15:06:01 +0200 (MEST) Received: (from ms@localhost) by moon.uakom.sk (8.13.8+Sun/8.13.8/Submit) id w8KD61it005151 for hostap@lists.infradead.org; Thu, 20 Sep 2018 15:06:01 +0200 (MEST) Date: Thu, 20 Sep 2018 15:06:01 +0200 From: Martin Stanislav To: hostap@lists.infradead.org Subject: [PATCH] eapol_test: Start the identifier at an initial random value Message-ID: <20180920130601.GA25015@moon.uakom.sk> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180920_060621_138056_DB990DC0 X-CRM114-Status: GOOD ( 10.13 ) X-Spam-Note: SpamAssassin invocation failed X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Martin Stanislav Start the (EAP request) identifier at an initial random value as recommended by RFC 3748 in section 4.1 Request and Response on page 21. Signed-off-by: Martin Stanislav --- wpa_supplicant/eapol_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c index 6548bd1..c99bebf 100644 --- a/wpa_supplicant/eapol_test.c +++ b/wpa_supplicant/eapol_test.c @@ -711,7 +711,7 @@ static void send_eap_request_identity(void *eloop_ctx, void *timeout_ctx) eap = (struct eap_hdr *) (hdr + 1); eap->code = EAP_CODE_REQUEST; - eap->identifier = 0; + eap->identifier = os_random() % 256; eap->length = htons(5); pos = (u8 *) (eap + 1); *pos = EAP_TYPE_IDENTITY;