Skip to content

Commit 99870e4

Browse files
committed
cidata: Use mac address as dhcpd identifier
On macOS the DHCP server use the DUID+IAID for both hw_address and identifier, which makes it harder to discover the machine mac address by looking up leases in /var/db/dhcpd_leases. It seems that this issue started in macOS 15. % cat /var/db/dhcpd_leases { name=lima-test ip_address=192.168.105.4 hw_address=ff,5c:bb:eb:5e:0:2:0:0:ab:11:72:3e:92:23:14:1d:a7:ba identifier=ff,5c:bb:eb:5e:0:2:0:0:ab:11:72:3e:92:23:14:1d:a7:ba lease=0x678b8aee } With this change the record is created using the mac address: % cat /var/db/dhcpd_leases { name=lima-test ip_address=192.168.105.4 hw_address=1,52:55:55:ba:82:85 identifier=1,52:55:55:ba:82:85 lease=0x678b90c6 } The fix is based on: cirruslabs/linux-image-templates#39. Minikube have the similar (networkd specific) fix: kubernetes/minikube#3572 Signed-off-by: Nir Soffer <[email protected]>
1 parent 9248baf commit 99870e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/cidata/cidata.TEMPLATE.d/network-config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ethernets:
88
set-name: {{$nw.Interface}}
99
dhcp4-overrides:
1010
route-metric: {{$nw.Metric}}
11+
dhcp-identifier: mac
1112
{{- if and (eq $nw.Interface $.SlirpNICName) (gt (len $.DNSAddresses) 0) }}
1213
nameservers:
1314
addresses:

0 commit comments

Comments
 (0)