All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: lists@jade.fyi
Cc: connman@lists.linux.dev
Subject: Re: [PATCH] service: Fix an additional case of autoconnect breakage under iwd
Date: Mon, 16 Jan 2023 08:52:31 +0100	[thread overview]
Message-ID: <20230116075231.pfwuothbkq2v56zk@beryllium.lan> (raw)
In-Reply-To: <20230111190837.209460-1-lists@jade.fyi>

Hi Jade,

On Wed, Jan 11, 2023 at 02:08:37PM -0500, lists@jade.fyi wrote:
> From: Jade Lovelace <lists@jade.fyi>
> 
> Error flow:
> - __connman_service_create_from_network() creates network, but it is not
>   favorite since it is not yet saved
> - trigger_autoconnect is skipped since !favorite
> 
> *** User calls Connect() ***
> - iwd plugin gets connect() call
> - iwd plugin finds out about new known network and copies the
>   autoconnect state of the iwd_network to the iwd_known_network, which
>   is false since it was zero initialized and nobody called
>   connman_network_set_autoconnect on it.
> - 💥 iwd plugin tells iwd to set AutoConnect to false
> - service_indicate_state() calls __connman_service_set_favorite(service,
>   true)
> - nobody tells the iwd plugin about the change in favorite state
> 
> This patch calls trigger_autoconnect right at the end there, which will
> then propagate the outcome of the favorite state to the iwd plugin. I
> think this patch is the right design for the current architecture of the
> autoconnect state management, but I think the autoconnect design
> probably needs some changes outside the scope of this patch since it is
> too easy to make these mistakes.


All four patches applied after minor documentation tweaking (e.g.
s/connman/ConnMan/ etc). I removed the Signed-off-by because we don't have
defined how this has to be interpreted in this project (read we are lacking the
DCO document which explains sets the rules).

Thanks,
Daniel

      reply	other threads:[~2023-01-16  7:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 21:50 Patches for the AutoConnect bug I hit in the iwd plugin lists
2023-01-07 21:50 ` [PATCH 1/3] plugins/iwd: Rename autoconnect fields to clarify meaning lists
2023-01-07 21:50 ` [PATCH 2/3] plugins/iwd: Fix typo in create_known_network name lists
2023-01-07 21:50 ` [PATCH 3/3] plugins/iwd: fix iwd autoconnect being set wrongly on new connections lists
2023-01-09 21:02   ` Jade Lovelace
2023-01-11 19:08     ` [PATCH] service: Fix an additional case of autoconnect breakage under iwd lists
2023-01-16  7:52       ` Daniel Wagner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230116075231.pfwuothbkq2v56zk@beryllium.lan \
    --to=wagi@monom.org \
    --cc=connman@lists.linux.dev \
    --cc=lists@jade.fyi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.