lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8a77faa-6424-a24c-6257-2dc02fe9180b@datenfreihafen.org>
Date: Thu, 7 Dec 2023 21:42:33 +0100
From: Stefan Schmidt <stefan@...enfreihafen.org>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
 Alexander Aring <alex.aring@...il.com>, linux-wpan@...r.kernel.org
Cc: David Girault <david.girault@...vo.com>,
 Romuald Despres <romuald.despres@...vo.com>,
 Frederic Blain <frederic.blain@...vo.com>,
 Nicolas Schodet <nico@...fr.eu.org>,
 Guilhem Imberton <guilhem.imberton@...vo.com>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
 netdev@...r.kernel.org
Subject: Re: [PATCH wpan-next 1/5] mac80254: Provide real PAN coordinator info
 in beacons

Hello.

On 28.11.23 12:16, Miquel Raynal wrote:
> Sending a beacon is a way to advertise a PAN, but also ourselves as
> coordinator in the PAN. There is only one PAN coordinator in a PAN, this
> is the device without parent (not associated itself to an "upper"
> coordinator). Instead of blindly saying that we are the PAN coordinator,
> let's actually use our internal information to fill this field.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> ---
>   net/mac802154/scan.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c
> index 7597072aed57..5873da634fb4 100644
> --- a/net/mac802154/scan.c
> +++ b/net/mac802154/scan.c
> @@ -466,6 +466,7 @@ int mac802154_send_beacons_locked(struct ieee802154_sub_if_data *sdata,
>   				  struct cfg802154_beacon_request *request)
>   {
>   	struct ieee802154_local *local = sdata->local;
> +	struct wpan_dev *wpan_dev = &sdata->wpan_dev;
>   
>   	ASSERT_RTNL();
>   
> @@ -495,8 +496,7 @@ int mac802154_send_beacons_locked(struct ieee802154_sub_if_data *sdata,
>   		local->beacon.mac_pl.superframe_order = request->interval;
>   	local->beacon.mac_pl.final_cap_slot = 0xf;
>   	local->beacon.mac_pl.battery_life_ext = 0;
> -	/* TODO: Fill this field with the coordinator situation in the network */
> -	local->beacon.mac_pl.pan_coordinator = 1;
> +	local->beacon.mac_pl.pan_coordinator = !wpan_dev->parent;
>   	local->beacon.mac_pl.assoc_permit = 1;
>   
>   	if (request->interval == IEEE802154_ACTIVE_SCAN_DURATION)

Acked-by: Stefan Schmidt <stefan@...enfreihafen.org>

regards
Stefan Schmidt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ