running full stack as my provider is IPV4 CGNAT + IPV6 so IPV6 is mandatory for remote acces to my network.
Lately my rpi are causing my dnsmasq (dns & dhcpv4 & dhcpv6) server on my router to have no more leases as they are multiplying ipv6 leases with different DUIDs as illustrated below for the case of my pi4 whose ethernet interface MAC address is “dc:a6:32:1d:c9:0f” and the related lines in my dnsmasq.leases file (router running ddwrt)
and fddd:: is my ULA prefix (I also have a Public prefix and the same multiple leases with it… but for privacy I won’t add it :-))
So connman should be providing a SLAAC address to the server to store in dns table and getting fddd::9 lease from the server.
From what I have read as only the ethernet port is connected there is no reason of seeing these differnets DUIDs for pi4
I searched and googled but cannot find where connman stores the DUID(s) it uses or how it creates it (them) to send it(them) to the dhcpv6 server…
Where/how can I force a unique dhcpv6 DUID for a specified “service” in osmc ?
the DUID should be read out of the file in method set_duid. So, it’s intended to be stable over time.
But in real the DUID is recreated on every reboot. @sam_nazarko, can you help @dwardor with more details, where he can address his issue to the connman folks?
Perhaps, this is a result of switching between manual and auto configuration … who knows?
I suggest to remove the config directory and restart the ipv6 configuration, like
My DUID is not getting stored … so everytime I disconnect/connect the service connmanctl disconnect ethernet_xxx && connmanctl connect ethernet_xxx or restart connman systemctl restart connman (I have a cron job checking connectivity and doing just that) a new DUID is created on new DHCPV6 connection → explains why the lease file fills up during the day
So the underlying issue is: Why is the DUID no getting stored ?
Will try removing the the service as per your suggestion and recreating it from scratch
the IPV6.DHCP.DUID appears in the 2nd cat settings and then disappears in the 3rd cat settings when IPv6.DHCP.LastAddress= appears (could writing it erase the DUID ? → going to look at the source)
you don’t have a IPv6.DHCP.LastAddress= in your settings file a few posts above
any further cat settings return the same thing as the 3rd one.
Strange, only idea I have, that this behaviour is dependent from the dhcpv6 answers.
Besides that, on my system I get a new DUID on every boot (or might be disconnect/connect) … it looks also to be wrong.
If I deactivate the DHCPv6-server in my environment (router is an AVM Fritz!Box 7590), the DUID line in the settings file also disappears.
So, it is dependent from the communication with the DHCPv6 server.
@sam_nazarko would it be possible for you to compile a test connman package modified with this simple patch:
>cat test.patch
--- src/dhcpv6.c 2024-04-05 22:08:13.180517921 +0200
+++ src/dhcpv6.c 2024-04-05 22:08:35.943982173 +0200
@@ -225,7 +225,7 @@
int ret;
int type = __connman_ipconfig_get_type_from_index(index);
- ret = g_dhcpv6_create_duid(G_DHCPV6_DUID_LLT, index, type,
+ ret = g_dhcpv6_create_duid(G_DHCPV6_DUID_LL, index, type,
&duid, &duid_len);
if (ret < 0) {
g_key_file_free(keyfile);
using patch src/dhcpv6.c test.patch
This makes connman use a DUID_LL instead of a DUID_LLT dropping the T(time) information so the DUID_LL should always be the same (even if not stored in the keyfile) as suggests src/client.c
We should also check that the change is valid against top of tree ConnMan (master) and whether such a fix has been implemented already? It’s late here so I won’t do that now.
In the interim, I already made such a change available here:
I’m still wondering why the connman folks insert timestamp information by default. Are there dhcpv6 systems, which have a problem with getting the same DUID again and again?
I also just downloaded master and verifed the patch also applies to it
However, it still would be nice to file 2 bug reports for connman’s underlying bugs regarding sending different DUIDs with the default G_DHCPV6_DUID_LLT:
for the DUID not being stored (because overwritten ?) in the settings file (my case)
stored DUID not being correctly reused and a new one generated and used (JimKnopf case)
→ am not figuring out how to do that grep -i bug * picks up no instruciton for filing/reporting a bug report