Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp926704ybs; Mon, 25 May 2020 02:47:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJwQa/aOMvbEuNpWQmxFEhiVtNcqP6cjsC7Gl9kMWx0bQRSX8juDUJHjJ520H48y2CtUNj X-Received: by 2002:a17:906:c155:: with SMTP id dp21mr17188590ejc.92.1590400034411; Mon, 25 May 2020 02:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590400034; cv=none; d=google.com; s=arc-20160816; b=str8fBPczng4Jitpe1hcD2LXY24GGB3ZgmCDsbMiuW6DA36eWo2kEk2yLiUOwgb9Ch G8NpU7BI3USk5a0WsmuzYpsE9K1TCml4Idbmh5psVlib5x9UnjunNqjM74Bbwxuwj2GP UieEgdFetrRpAqaQW6QbaO8D7gYh2K54lo8Bix3naGtniE9pGxmAYluNtReC9KPi2mMU VMoP66FM5TnM+YF7dGQ/W38S9Vodc3dhDEp/Kf9e5qQq1YDLlWv1uAYyuZFSUY2Oiwyl ceBF+/OcP1OfYyGQb+C/FF/db+yBNQxIBVG8gkYoRoz/CM4cUfFfCHJDSaSFXwMV5RYT KPxQ== 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:to:from:subject:message-id; bh=ySgVaWTX9EwMWr+/D4GDTqsCpp3BL1GrtouwBkoD4Yg=; b=tSmkQlAbK10y3mc2zUQ2mOAb9wRzqCeLbBAV3HoaIoVgxHi0M4eoI1Vgvk3hPjHa6D xI5ZaqRUBSvEoisAJffO7SH8KXccq1+kYtdHEkEvqEy8a7NLH1OaSNWBVMJ8WWZJJR12 qB4euDB6xem4KzCf9TNeOZQZZg46v3icPzVmvSkDK2zJwMpKlHGFHn13dT6MU2duB/xz 5RV2LVwDZjejmRLdDPvlQ658opS2NLul4P+iomOtIIrJa+EwsOwjaO7r6V7tm+yM0JOi KSrsjL0i+W35s1+sHdd9Cj4JmjVHBXZDeqefOMf9/nWRMyl9Sb+SlKAtx1KkzthlnOhf 9fYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si9654586edc.174.2020.05.25.02.46.49; Mon, 25 May 2020 02:47:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389504AbgEYJoD (ORCPT + 99 others); Mon, 25 May 2020 05:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389356AbgEYJoC (ORCPT ); Mon, 25 May 2020 05:44:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C095EC061A0E for ; Mon, 25 May 2020 02:44:01 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jd9eK-002cG6-1E; Mon, 25 May 2020 11:44:00 +0200 Message-ID: Subject: Re: Potential IBSS race From: Johannes Berg To: James Prestwood , linux-wireless@vger.kernel.org Date: Mon, 25 May 2020 11:43:59 +0200 In-Reply-To: (sfid-20200506_174456_293312_214B015A) References: (sfid-20200506_174456_293312_214B015A) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) 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 Wed, 2020-05-06 at 08:44 -0700, James Prestwood wrote: > Hi, > > It appears that when two IBSS networks are started at the same time > they sometimes don't pick each other up and two separate IBSS networks > are created. I have turned on IBSS logging and see beacons coming in > from both networks AFTER each interface creates its own IBSS, but they > dont come soon enough for either interface to realize there is already > an IBSS. I guess that makes some sense. Perhaps the number of scans should be random, but then of course if they land on the same value, it'll still happen. > Is there any mitigation in the kernel or anything outlined in > 802.11 that handles this case of two IBSS networks being created > simultaneously (or close to it)? If neither of them has any other stations, then it should go into the merge timer every 30 seconds. But if they're identical, then maybe even that doesn't work since they'll go scanning at the same time, and again fail? Maybe that's a better approach - make the merge timer be randomized between 30 and 60 seconds or so, so that they can eventually merge. > Even delaying the second network by a > full second sometimes results in this behavior. A second isn't really sufficient I guess, because a full scan will take 5 seconds or so. That's the minimum you'd have to delay, I think. At least if you're creating the network on a channel that's scanned early in the scan (i.e. a 2.4 GHz channel). johannes