public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* Wrong source MAC for DHCP requests with AddressRandomization=network
@ 2023-11-24 11:58 Toke Høiland-Jørgensen
  2023-11-24 16:23 ` Denis Kenzior
  0 siblings, 1 reply; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2023-11-24 11:58 UTC (permalink / raw)
  To: iwd

Hi

When setting AddressRandomization=network in main.conf, I am unable to
connect to networks because I don't get a DHCP reply after the L2
connection.

Looking at a packet dump, it seems the DHCP request uses the wrong
source MAC in the request:


12:42:27.268867 1e:aa:ca:6d:0d:e0 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 26:db:f3:cb:58:e2, length 300

Running 'dhcpcd' uses the right source MAC, and gets a reply:

12:42:28.631616 1e:aa:ca:6d:0d:e0 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 1e:aa:ca:6d:0d:e0, length 300
12:42:28.634842 92:0a:9a:27:ca:65 > 1e:aa:ca:6d:0d:e0, ethertype IPv4 (0x0800), length 359: 10.42.3.33.67 > 10.42.3.52.68: BOOTP/DHCP, Reply, length 317
12:42:28.635323 1e:aa:ca:6d:0d:e0 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 1e:aa:ca:6d:0d:e0, length 300
12:42:28.636450 92:0a:9a:27:ca:65 > 1e:aa:ca:6d:0d:e0, ethertype IPv4 (0x0800), length 359: 10.42.3.33.67 > 10.42.3.52.68: BOOTP/DHCP, Reply, length 317

The initial connection after starting iwd works, but connecting to
another network later fails, so it seems to be related to the
per-network MAC address selection. Changing the config to
AddressRandomization=once makes this issue go away.

This issue occurs with both iwd 2.8 and 2.9 (on Arch Linux and iwlwifi
hardware).

-Toke

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-25 23:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24 11:58 Wrong source MAC for DHCP requests with AddressRandomization=network Toke Høiland-Jørgensen
2023-11-24 16:23 ` Denis Kenzior
2023-11-24 16:53   ` Toke Høiland-Jørgensen
2023-11-24 17:09     ` Denis Kenzior
2023-11-24 17:51       ` Toke Høiland-Jørgensen
2023-11-24 19:21         ` Rhys Perry
2023-11-25 23:30           ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox