Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2049517ybv; Fri, 14 Feb 2020 10:27:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxYO1RoMunFprpIIiZUJtquUnDMT+2bSaV9O3CNzx9BOoxjCnM8+pjMxX2GapZw8o5d+WAK X-Received: by 2002:a9d:6c58:: with SMTP id g24mr3500983otq.229.1581704865142; Fri, 14 Feb 2020 10:27:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581704865; cv=none; d=google.com; s=arc-20160816; b=EbNVrcPYgD3lCYJS5Hou9f9Q2lr/3AHjZ5h9L88Y2r9MAbv856O2jnrFlHJ0rvVHnB NZBDPG5V0rhEf6peaBSfbJcggGYgeWDRprPhoQUni9POAGdrGLQpxKCB9JOsl8dfYS/+ u+hlJXcYX2Uj1MT4EZoJ1ljivtJMdz2OP1RxyWcC+JL3tGtLIbwpl0I1GGI6mE7L9jT3 uVZqDxaNHdeBMRsGNPACqwk0rYIBqiBPjBHHA9tQlrsDsSURTOvnpQGsf8TZEELgHEGm XMvsNBuwss09Tzenz69/e/ct0ElRWeHwJTYVSvNvM2IS3Kb4tUeSv7uPJVVG4IXB+XU9 BLbQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KgVOFyOZ+a9ix5l6En2g5zR0wBoOVgcTRgg+tuBAT5A=; b=iZpaSvIFXCmM3CjUia6u3Q7joQqsols/YHdqDhmFY6eFYypdA+VOgnbQlrx3VqQu8m SpXUToE1y0aJrKLGt3/xswohUogWxJ2VzwEkvDEizeWNtV2pyX2TW7AXt/YMvfqjskz4 BSbtRhUtmX+F9+hQnFULtpYDXkIOenRYVekApTCO6wumZ+LFdyTGudlMPEMQXu22pvVe 7vnJT0wyp5ZAUvTaAcYMJFPxjp8qZmtFgTKmQEAGjjkx9ktZxZ69wic805aTZaCMXx8X kllDy/K/E9fW+oEa1SIf6uWNVLZIOx5Nu4YeGMfW3E4fh9LW2QY1/Acvv16RWCJrSp8f tUwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="CVNlNM/H"; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si3532228otk.239.2020.02.14.10.27.33; Fri, 14 Feb 2020 10:27:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="CVNlNM/H"; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388253AbgBNS0l (ORCPT + 99 others); Fri, 14 Feb 2020 13:26:41 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:44966 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387833AbgBNS0l (ORCPT ); Fri, 14 Feb 2020 13:26:41 -0500 Received: by mail-oi1-f193.google.com with SMTP id d62so10272619oia.11 for ; Fri, 14 Feb 2020 10:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=KgVOFyOZ+a9ix5l6En2g5zR0wBoOVgcTRgg+tuBAT5A=; b=CVNlNM/Hv2X27cs1gU11Dw47A4YDwMUj0pJC35tDPMNjxiWaGhIW6LyxlE7//WDSKN EfPt/zUjFoTb+hi4keoVZvka5OLP3xuyYPXUqlPYf/r9jv2guQ8PZvZIoJ/qk75nYfab qVOT64P01GQAiz0qzfC9KI0BZF8PvD25nE4XiwTTXY3npvO2f1jYvBGe9jGk+hwTTXwF 9tkQE/6CqVOq6cKravHPhPMMcvUuUMXaM4ROizW0DPsUB5yrLg0MjJHFUM0hmrmT9Yb3 ol0/cw61OVxDe8npNZFYWBCraD2VIF6P5lGmnfrteDQkJg40kQDBLgtSOwMNyaErjfjG p8Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=KgVOFyOZ+a9ix5l6En2g5zR0wBoOVgcTRgg+tuBAT5A=; b=mwzX4RdQfvy72LFmtqHVQI0Cslin3pGRwotGg5Z6JSZt5kxfUMkDLHFVWQld3XkJQx bQC64hdeuyrko007qMouGDkCqSEFUuzgE5SER8wddGg+y+FtPLGbkynIo1UtUrJ+PNPj QlwzaJN7F9cQri85dKVR7Q2B/zu3PbmFQuviBkk0rzRqTmAT6q3aanUw5W2WNonuWFYA nnfAhk47mGE3xpx1weHLPFayvCBsZArxQ50WAPMOo5BKs35Ng1TWK2/QL07uImKXetBv FAfT0PWQv0q/X2JuQXlNLsch60D8p7aAxMlhLdjbg2g0bXYXbgMQHyIsGRVN8dze4CwF tILw== X-Gm-Message-State: APjAAAU74gfUZUnoNe6+LGPfqcW/f7m8/spYiX86xGlLPv2qv4c3rJBj W3ZGQ8fODXHqudgQafpxWwV8AmPL0+3Nt1y9BvA= X-Received: by 2002:aca:ab51:: with SMTP id u78mr2792877oie.21.1581704800388; Fri, 14 Feb 2020 10:26:40 -0800 (PST) MIME-Version: 1.0 References: <20200214114350.Bluez.v3.1.I333a90ad3c75882c6f008c94a28ca7d3e8f6c76e@changeid> <1BEAEE28-6159-491D-BCCC-4C5298891987@gmail.com> In-Reply-To: <1BEAEE28-6159-491D-BCCC-4C5298891987@gmail.com> From: Luiz Augusto von Dentz Date: Fri, 14 Feb 2020 10:26:29 -0800 Message-ID: Subject: Re: [Bluez PATCH v3] core: Add new policy for Just-Works repairing To: Johan Hedberg Cc: Howard Chung , Bluez mailing list , Luiz Von Dentz , ChromeOS Bluetooth Upstreaming Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Howard, On Thu, Feb 13, 2020 at 11:35 PM Johan Hedberg wr= ote: > > Hi Howard, > > On 14. Feb 2020, at 5.45, Howard Chung wrote: > > @@ -6141,6 +6141,22 @@ int device_confirm_passkey(struct btd_device *de= vice, uint8_t type, > > struct authentication_req *auth; > > int err; > > > > + /* Just-Works repairing policy */ > > + if (confirm_hint && (device_is_paired(device, BDADDR_BREDR) || > > + device_is_paired(device, BDADDR_LE_PUBLIC= ))) { > > Wouldn=E2=80=99t a single call to device_is_paired() using =E2=80=9Ctype= =E2=80=9D (the address type that=E2=80=99s part of the mgmt event) be the r= ight thing to do here? +1, other than that it looks pretty good now so we should be able to merge after this change. --=20 Luiz Augusto von Dentz