Situation:
I'm using ConnMan 1.41 on an embedded device. The interface configuration looks as follows:
[ethernet_deadbeefcafe_cable]
Name=Wired
AutoConnect=true
IPv4.method=auto
IPv6.method=auto
IPv6.privacy=disabled
DHCP works. When there is no DHCP server, ConnMan falls back to IPv4LL (you may know it as mDns, Bonjour or Zeroconf). That is, the device gets a random IP in the 169.254.0.0/16 link-local range. But the IP changes on every reboot. However, other embedded devices conveniently use a constant seed (e.g. MAC) to always generate the same IP.
Question:
- How to configure ConnMan to use the same IPv4LL address across reboots?
Tried:
- I found no option to configure that for IPv4.
- For IPv6 there is
IPv6.privacy=enabled
, which works. - Looking at the code (
ipv4ll_start
, line 1372), I see no hint for a configuration option.
I will now try to manually patch it in the code. But on first glance this will probably break IP collision handling.