Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1787474ybd; Thu, 27 Jun 2019 01:26:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYrhxc3atHS8NXCFv5TVZDy+RuHJa/EvZUOs+AloauFAoOcwFFnTVK5Ozp3CMD/QVDmcMJ X-Received: by 2002:a17:902:b94a:: with SMTP id h10mr3211384pls.125.1561624004981; Thu, 27 Jun 2019 01:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561624004; cv=none; d=google.com; s=arc-20160816; b=U0+HflwfcVguaV5lkn/nvZAfmKsqqAwIwmWqnggH1yyK7WDrJ01yIVWhHtoFee0e3M HJ8As/sZkfLVPGeNj9OBNar53DfcYNO7dHxWf7atPjYRqilv588AOsujkKB0Cf47vF5N Gu5IXk0YMXxxsJEs5NlZzS+yBpmvGoa2r4WxXOOf7/bE6FefCPCDAm8AYKhlYVgzE71s m7YyT+SKg6PnLnzpn7IqvgNHUmRiNqyCHx3Sjp2OhQvQP0m7TCrnjZi/gfUGgJYDHWTt k/Vfwv7w8B+8xqBdkJnC9RxNcDlbUmT0LflPr9M6nBUskuQnNSPyUVZqz5poWjwb0ebG pqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=DNAfkzKsEV8MqrScPAYLv+RA9PlvozRcj9mz2DIOnM0=; b=UtPFArDrZdV0mNSE6ZBUhS2YU0UBhh1qKmdH40m072IaVCNVklGTf3VM0+hpSQeg3+ zFReA4W5rodP7PvPkwGryn8cVUo0muU4gjcolbe1Wzvpc+OgBAI71xEKeXztFO44vY/f 96H/OP5giRaWA8dhMBsVBCrwYW5LIwD4HlJaWLj+v87J1HgUgDhf/TNyBz6hx7EukzfX 7U+4FQzVLS47bdFhMpWPlUgLdXCh0tI0WYC+HmiT4NTxWinlrMxflJN0mHzZTOMQy3HS NOptcO3h1l1NiY4qK/c1jbk+hAWMI9DyfC7NI9Yvv/Kpuuy/YO7kYmpT0/2iapY07l+P luCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=JcdKKNwX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si1596411pgc.75.2019.06.27.01.26.18; Thu, 27 Jun 2019 01:26:44 -0700 (PDT) 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=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=JcdKKNwX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbfF0IZx (ORCPT + 99 others); Thu, 27 Jun 2019 04:25:53 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43345 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbfF0IZx (ORCPT ); Thu, 27 Jun 2019 04:25:53 -0400 Received: by mail-lj1-f193.google.com with SMTP id 16so1395034ljv.10 for ; Thu, 27 Jun 2019 01:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=DNAfkzKsEV8MqrScPAYLv+RA9PlvozRcj9mz2DIOnM0=; b=JcdKKNwXgY8UcLVNTdbyTq3KfKQDW5jX1yBa9J3raUsaxfvIBaZW9EaCHAsowWkHiV bXOSGd9svZ8B4ju1MD1qEujHZJWJsTNMGgsFu13HDTwxRlpYXXe4GyfGW0cRXa0oB6Qj 6UWUZ7KksGgM9bJFxMoMNLysCxqf9UMB3kqc2Lx7L8zzfbclSMfBwI1YRe9wu6J5NTu2 TLUcrmtNtEs/8VRcWOY5XmCXXDwPxqGx8sS0+YuNoSzbOrtm8KqWsMKD2uzLeMCnXZIK rhRgDGUXFNNudZ9b7jxPmhAT/93LSXe/MDP0b5tWEODyEVTTedQL2Erg+mAsaYJNLkRE 8+yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=DNAfkzKsEV8MqrScPAYLv+RA9PlvozRcj9mz2DIOnM0=; b=Jw43Aebqzvi6FPsZIU09Bfr36ZaQeUS9UgfrcP8+5x1zcoJsDL9pGBeEoKJJQX9RLq rh57SvBecm5MfUxhM1xM4H7sY+CTkTNTB6EaYbXH4qi1H32hn1QEfljbzv/3qtOIyrga oAy6cCpxAcjgAuknZS3EO+XAFJLdxtndS5L7WWfVdM1duaEAd12AwynBTpGtvmXMYD9L Vqepb2UIqPkoFWlV7Li0jIJHRFsNBcvqmcTeyCztjz8EWLWTDKJQQMmuMxWNC0yR0ma6 LT26QEHjg6Yzi4rmmvV2/+mbnA2TW75Gt39/IVzkb5deiTNdwrZZQ2qSiGktBrrIcAVD EPeA== X-Gm-Message-State: APjAAAV0fwy+CexdOxAgoeP9/Mx43yZk2t/FMq5GLcK0PsNHXHxTVROY fdcI8VQXrdkWkS7GpoVIWJngp9YaXqs= X-Received: by 2002:a2e:8ed2:: with SMTP id e18mr1793174ljl.235.1561623950700; Thu, 27 Jun 2019 01:25:50 -0700 (PDT) Received: from mlowasrzechonek2133 ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id h84sm247247ljf.42.2019.06.27.01.25.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 01:25:49 -0700 (PDT) Date: Thu, 27 Jun 2019 10:25:47 +0200 From: =?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek To: linux-bluetooth@vger.kernel.org Cc: Brian Gix Subject: Re: [PATCH BlueZ v3 2/2] mesh: Use current IV Index when relaying Message-ID: <20190627082547.dpoymsqlufh32ex5@mlowasrzechonek2133> Mail-Followup-To: linux-bluetooth@vger.kernel.org, Brian Gix References: <20190627074043.22891-1-michal.lowas-rzechonek@silvair.com> <20190627074043.22891-3-michal.lowas-rzechonek@silvair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190627074043.22891-3-michal.lowas-rzechonek@silvair.com> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On 06/27, Michał Lowas-Rzechonek wrote: > If we are in IV Update state, packets shall be transmitted using IV > Index - 1, including relayed packets. > --- > mesh/net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mesh/net.c b/mesh/net.c > index a5693f154..0a6ff8eac 100644 > --- a/mesh/net.c > +++ b/mesh/net.c > @@ -2512,7 +2512,7 @@ static void net_rx(void *net_ptr, void *user_data) > relay_advice = packet_received(net, key_id, iv_index, > out, out_size, rssi); > if (relay_advice > data->relay_advice) { > - data->iv_index = iv_index; > + data->iv_index = mesh_net_get_iv_index(net); Ew, I misread the spec. 3.4.6.3 explicitly says: "When a message is retransmitted, as defined below, the IV Index used when retransmitting the message shall be the same as the IV Index when it was received" Please disregard this patch. cheers -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND