On 23/01/2020 14:09, redfast00 _ wrote:
With the mac_addr=1 option, you can enable MAC-address randomisation.
I don't think hardware address randomisation should be part of wpa_supplicant,
but rather a higher level controller - such as DHCP or a network management tool
that supports this.
https://tools.ietf.org/html/rfc7844
This randomises the MAC address for every ESS connection, so when
connecting to the same network after disconnecting, you will have
another MAC address. I would like to hardcode an address per network:
this could be an option per network: if the option is not there, it
takes the global option (either the default MAC address, or a randomly
generated MAC address if it is enabled).
I want to do this to accomplish 2 goals: have MAC address
randomisation, so I can't be tracked via the MAC address, and still
have a static MAC address on networks that need it (networks with a
static DHCP leases).
So when carrier goes down (or interface starts as down), randomise hardware address.
Perform scans, associate to a SSID.
SSID profile can associate some metadata:
Fixed or randomised hardware address.
Fixed or dynamic IP and misc config.
I looked into the sourcecode, and saw the wpa_drv_set_mac_addr in
wpa_supplicant.c, but I don't really know how to go about
implementing my patch and submitting it: I know C, but I don't know
what files should have what functions.
Again, I'm not sure wpa_supplicant is the place for this.
Each tool should do it's job - network management is NOT wpa_supplicants role -
it's just to provide a working link from your host to the access point.
dhcpcd is such a tool (disclaimer - I maintain it) and a patch to set hardware
address per profile (SSID profiles are a thing) should be fairly trivial.
It already supports RFC 7844 as I highlighted earlier, so there is no OS
specific code that neesd to be written. For example, wpa_supplicant has no code
at least to set hardware address on BSD that I know of, dhcpcd does.
dhcpcd might not be your thing, so I would suggest submitting any patches to an
equivalent project rather than wpa_supplicant.
Roy
_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap