Re: [PATCH v2 1/4] knownnetworks: network: support updating known network settings

James Prestwood
2023-12-19T17:49:38Z

On 12/19/23 9:46 AM, Denis Kenzior wrote:
> Hi James,
>
>>>
>>> Okay, then this patch in particular is not needed?
>>
>> Its at least partially needed, if a known network already exists
>> prior to DPP and its overwritten there is no callback. So we may not
>> need to actually touch network->settings at all as I thought. Just
>> emit an UPDATED event when the
>
> Okay, then just do that.
>
>> profile changes. DPP can then call network_autoconnect and the
>> settings _should_ be re-loaded unless I'm forgetting some instance
>> where network->settings can persist, but I don't think it can.
>
> network->settings is only created/opened when a connection is attempted.
Yeah, I think what caused most of my confusion was because DPP was using
network_set_passphrase/psk which will create an empty settings object if
the load fails (i.e. no profile). This then prevented
network_autoconnect() from opening the settings (since it thought they
already existed). So now the DPP change just syncs the profile and
doesn't touch the network object which lets network_autoconnect() deal
with loading, as it should.
>
> Regards,
> -Denis