'net ads join' fails on an ipv6 only system, because ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX in store_cldap_reply() rejects the ipv6 address (which is not really used). Windows DCs return an ipv4 address for CLDAP responses over ipv6 (if no real ipv4 address is available it returns 127.0.0.1 as fallback). So we can do the same locally in order to fill our cache. I'm wondering why this was not found while fixing https://bugzilla.samba.org/show_bug.cgi?id=15325 ...
This bug was referenced in samba master: 712ffbffc03c7dcd551c1e22815ebe7c0b9b45d2
Created attachment 18310 [details] Patch for v4-20-test
Created attachment 18311 [details] Patch for v4-19-test
Comment on attachment 18310 [details] Patch for v4-20-test LGTM, RB+
Comment on attachment 18311 [details] Patch for v4-19-test LGTM, RB+
Jule, please add to v4-19 and v4-20. Thanks!
This bug was referenced in samba v4-19-test: b6253028b303f4bd59b399e43417c7b050969363
This bug was referenced in samba v4-20-test: ba361b11d2e664f4d84718af71118bcdb31fc1f0
This bug was referenced in samba v4-19-stable (Release samba-4.19.7): b6253028b303f4bd59b399e43417c7b050969363
This bug was referenced in samba v4-20-stable (Release samba-4.20.2): ba361b11d2e664f4d84718af71118bcdb31fc1f0