From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <aahringo@redhat.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org, David Girault <david.girault@qorvo.com>,
Romuald Despres <romuald.despres@qorvo.com>,
Frederic Blain <frederic.blain@qorvo.com>,
Nicolas Schodet <nico@ni.fr.eu.org>,
Guilhem Imberton <guilhem.imberton@qorvo.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH wpan-next v4 01/11] ieee802154: Let PAN IDs be reset
Date: Mon, 25 Sep 2023 09:34:03 +0200 [thread overview]
Message-ID: <20230925093403.0ec27236@xps-13> (raw)
In-Reply-To: <CAK-6q+i_fVbj3ceMcCA8F-6aRcX2YX8+iMdQSYmQ7FWLNKfP+g@mail.gmail.com>
Hi Alexander,
aahringo@redhat.com wrote on Sun, 24 Sep 2023 16:42:31 -0400:
> Hi,
>
> On Fri, Sep 22, 2023 at 11:50 AM Miquel Raynal
> <miquel.raynal@bootlin.com> wrote:
> >
> > Soon association and disassociation will be implemented, which will
> > require to be able to either change the PAN ID from 0xFFFF to a real
> > value when association succeeded, or to reset the PAN ID to 0xFFFF upon
> > disassociation. Let's allow to do that manually for now.
> >
>
> ok. But keep in mind what happens when a device is associated and the
> user sets a short address manually to 0xFFFF?
>
> It should be a kind of forced mode of disassociation?
I believe once you start interacting with other devices with proper
associations, random user requests cannot all be addressed, in
particular once you are officially associated with another device, you
cannot change your own short address or PAN ID like that. So in the
right next series (after this one) I have a couple of small
additions through the tree to handle this kind of corner case. Here
is how it will look like in nl802154.c:
nl802154_set_short_addr():
/* The short address only has a meaning when part of a PAN, after a
* proper association procedure. However, we want to still offer the
* possibility to create static networks so changing the short address
* is only allowed when not already associated to other devices with
* the official handshake.
*/
if (cfg802154_device_is_associated(wpan_dev)) {
NL_SET_ERR_MSG(info->extack,
"Existing associations, changing short address forbidden");
return -EINVAL;
}
nl802154_set_pan_id():
/* Only allow changing the PAN ID when the device has no more
* associations ongoing to avoid confusing peers.
*/
if (cfg802154_device_is_associated(wpan_dev)) {
NL_SET_ERR_MSG(info->extack,
"Existing associations, changing PAN ID forbidden");
return -EINVAL;
}
I did not want to bloat this series with too much corner case handling,
so there are a couple of "misc additions" in the next series to handle
exactly that.
Thanks,
Miquèl
next prev parent reply other threads:[~2023-09-25 7:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 15:50 [PATCH wpan-next v4 00/11] ieee802154: Associations between devices Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 01/11] ieee802154: Let PAN IDs be reset Miquel Raynal
2023-09-24 20:42 ` Alexander Aring
2023-09-25 7:34 ` Miquel Raynal [this message]
2023-09-22 15:50 ` [PATCH wpan-next v4 02/11] ieee802154: Internal PAN management Miquel Raynal
2023-09-24 20:47 ` Alexander Aring
2023-09-27 16:10 ` Miquel Raynal
2023-09-29 0:22 ` Alexander Aring
2023-09-22 15:50 ` [PATCH wpan-next v4 03/11] ieee802154: Add support for user association requests Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 04/11] mac802154: Handle associating Miquel Raynal
2023-09-25 11:35 ` kernel test robot
2023-09-22 15:50 ` [PATCH wpan-next v4 05/11] ieee802154: Add support for user disassociation requests Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 06/11] mac802154: Handle disassociations Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 07/11] mac802154: Handle association requests from peers Miquel Raynal
2023-09-25 0:13 ` Alexander Aring
2023-09-25 7:43 ` Miquel Raynal
2023-09-27 1:31 ` Alexander Aring
2023-09-27 14:39 ` Miquel Raynal
2023-09-27 1:37 ` Alexander Aring
2023-09-27 15:40 ` Miquel Raynal
2023-09-29 0:19 ` Alexander Aring
2023-09-22 15:50 ` [PATCH wpan-next v4 08/11] ieee802154: Add support for limiting the number of associated devices Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 09/11] mac802154: Follow " Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 10/11] mac802154: Handle disassociation notifications from peers Miquel Raynal
2023-09-22 15:50 ` [PATCH wpan-next v4 11/11] ieee802154: Give the user the association list Miquel Raynal
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=20230925093403.0ec27236@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=aahringo@redhat.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=david.girault@qorvo.com \
--cc=edumazet@google.com \
--cc=frederic.blain@qorvo.com \
--cc=guilhem.imberton@qorvo.com \
--cc=kuba@kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nico@ni.fr.eu.org \
--cc=pabeni@redhat.com \
--cc=romuald.despres@qorvo.com \
--cc=stefan@datenfreihafen.org \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).