Closed LGA1150 closed 7 years ago
Thank you for your Issue!
To acquire an ipv6 address the app checks if the dhcp6c
process is running, if that's the case it will use the "communicator binary" dhcp6ctl
to signal the dhcp client that it should get a new ipv6 address.
Although this does not always work, therefore the app first deletes /data/misc/dhcp/dhcp6c_duid
in order for the dhcp client to get a new address.
For reference see: GetIPv6Address.java and SUCalls.java
The named methods are: start_dhpv6c_process
, send_signal_to_client_process
and check_process
Please try exactly that:
# if manually invoke does not work
# first become root
su
# verify that the dhcp6c process is running:
# also check if there are multiple dhcp6c processes running (if this is the case it wont work, there should only be one at a time)
ps | grep dhcp6c
# if yes then delete the duid file:
rm -rf /data/misc/dhcp/dhcp6c_duid
# and now invoke the communicator binary:
/system/bin/dhcp6ctl -C start interface wlan0
If nothing work you could also delete all leases (rm -rf /data/misc/dhcp
) and try again (with dhcp6ctl
).
Generating a DUID so often is a bad ideea IMHO. It goes against every recommendation in rfc 3315. It makes this client almost unusable in any v6 environment. The DUID is the echivalente of MAC in a v4 environment. Imagine a v4 network where every host is changing its mac address after every renew.
I now have read the DUID definitions of the rfc3315 and think that your are right. I will adapt my app accordingly.
About the the initial issue: in the current version of the app, the dhcp client will be restarted every time you connect to a wifi. (not using the communicator binary)
@bogdap could you please elaborate further where I generate the DUID.
Here in GenerateClientConfig.java I generate an ia-na
ID, but as far as I understand this has that nothing to do with the DUID. The DUID is automatically generated by the wide-dhcpv6 client.
Feel free to open again.
Although this does not always work, therefore the app first deletes /data/misc/dhcp/dhcp6c_duid in order for the dhcp client to get a new address.
The DUID is automatically generated by the dhcp client. From my experience with the wide-dhcpv6 client included in pfsense (freebsd based), once generated the dhcp client uses the same DUID stored in dhcp6c_duid file. Deleting this file forces the client to generate a new one.
Ah I see. This happens every time the client requests a new IP. I will remove this.
Fixed in version 1.5.4 (28) see #5
BTW, is it possible to make DHCPv6 part of LineageOS even though AOSP doesn't support?
@LGA1150 Well, you have to ask that the guys of LineageOS if they want/intend to include DHCPv6 in their ROM. (This is not for me to decide)
Sometimes the client is not working, even if I perform a 'manually invoke'. I tried executing dhcp6c manually in terminal with command
dhcp6c -c /etc/wide-dhcpv6/dhcp6c.conf -dDf wlan0
, and I got this errorIf I kill the old process with command
busybox killall dhcp6c
, it will work.So the workaround may be killing dhcp6c process before executing a new one.