Re: [PATCH BlueZ] mesh: Fix IV Recovery procedure when IV Update is in progress

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian,

On 09/05, Gix, Brian wrote:
> >  	if (net->iv_upd_state == IV_UPD_INIT) {
> > -		if (iv_index > net->iv_index)
> > +		if (iv_index > net->iv_index + 1)
> >  			mesh_net_set_seq_num(net, 0);
> 
> I think you have found something, but I think we are missing something here...
> 
> If iv_index > net->iv_index, and iv_update == false, then we still
> want to reset to Seq Zero, I think...Even if the increase is just 1.

Indeed. Let me re-test both scenarios and I'll get back to you with v2.

> So perhaps:
> 	if (iv_index > net->iv_index && !iv_update)
> 		mesh_net_set_seq_num(net, 0);
> 	else if (iv_index > net->iv_index + 2)
> 		mesh_net_set_seq_num(net, 0);
> 
> Or more esoterically (and maybe harder to follow):
> 	if (iv_index > net->iv_index + iv_update)
> 		mesh_net_set_seq_num(net, 0);
> 
> Or something like that.

Yeah, that looks reasonable.

-- 
Michał Lowas-Rzechonek <michal.lowas-rzechonek@xxxxxxxxxxx>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux