Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 5/7] manager: add 'network' option to AddressRandomization
Date: Tue, 17 Mar 2020 10:38:53 -0700	[thread overview]
Message-ID: <20200317173855.19680-5-prestwoj@gmail.com> (raw)
In-Reply-To: <20200317173855.19680-1-prestwoj@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

To enable per-network address randomization a new value was added to
the AddressRandomization option. Providing a value of 'network' will
cause the device to generate and set a new MAC address based on the
SSID of the network being connected to.
---
 src/manager.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/manager.c b/src/manager.c
index 05f61b6f..994e70e4 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -748,6 +748,8 @@ static int manager_init(void)
 			mac_type = NETDEV_SET_MAC_ONCE;
 		else if (!strcmp(randomize_str, "disabled"))
 			mac_type = NETDEV_SET_MAC_DISABLED;
+		else if (!strcmp(randomize_str, "network"))
+			mac_type = NETDEV_SET_MAC_NETWORK;
 		else
 			l_warn("Invalid [General].AddressRandomization"
 				" value: %s", randomize_str);
-- 
2.21.1

  parent reply	other threads:[~2020-03-17 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17 17:38 [PATCH 1/7] netdev: prepare for MAC randomization rework James Prestwood
2020-03-17 17:38 ` [PATCH 2/7] netdev: manager: pass mac type to netdev_create_from_genl James Prestwood
2020-03-17 17:38 ` [PATCH 3/7] wiphy: add _generate_address_from_ssid James Prestwood
2020-03-17 17:38 ` [PATCH 4/7] netdev: support per-network MAC addresses James Prestwood
2020-03-17 17:38 ` James Prestwood [this message]
2020-03-17 17:38 ` [PATCH 6/7] station: print error message if setting MAC failed James Prestwood
2020-03-17 17:38 ` [PATCH 7/7] doc: document AddressRandomization=network option James Prestwood

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=20200317173855.19680-5-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /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