[PATCH] Implement ipv4+ipv6 flags in resolv.conf

Petr Menšík pemensik@redhat.com
Thu Nov 21 22:11:04 GMT 2024


Ah, but omitted IPV4 flag only. Second version attached here.

On 21. 11. 24 22:13, Petr Menšík wrote:
> Hi!
>
> I have made a rebase of my older attempt and would like some comments, 
> if possible. The problem is described at bug #30544 [1]. My proposal 
> would be simple disabling of sending A or AAAA queries on hosts. This 
> is a bit modified previous patch.
>
> What I want is to have getent ahosts example.com to resolve only IPv4 
> address, if I added ipv4 option into /etc/resolv.conf. But at the same 
> time it should tell me IPv6 address if I do getent ahostsv6 
> example.com. It does not have to lie, just does not ask unless asked 
> explicitly.
>
> That would make ping example.com try only IPv4 address, but ping -6 
> example.com try IPv6 address. That is main change compared to noaaaa 
> option. It should not prohibit query, just avoid unless someone asked.
>
> Expected into future would be that NetworkManager or any service 
> managing /etc/resolv.conf would add ipv4 when it has non-link local 
> route to ipv4 and similar with ipv6 flag. But even if set manually now 
> it can be useful, IMO.
>
> I would like some pointers, how to make this feature tested. This is 
> my first change proposed to glibc and I have no experience with making 
> tests for it. Help with desired.
>
> What do you think of that change?
>
> Best Regards,
> Petr
>
> 1. https://sourceware.org/bugzilla/show_bug.cgi?id=30544
>
-- 
Petr Menšík
Senior Software Engineer, RHEL
Red Hat, http://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-resolv.conf-implement-ipv4-ipv6-flags-bug-30544.patch
Type: text/x-patch
Size: 6368 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241121/4ee3ae45/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x4931CA5B6C9FC5CB.asc
Type: application/pgp-keys
Size: 9736 bytes
Desc: OpenPGP public key
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241121/4ee3ae45/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241121/4ee3ae45/attachment-0001.sig>


More information about the Libc-alpha mailing list