Fwd: New tool intercepting and overriding libc DNS calls

Brad House brad at brad-house.com
Thu Mar 14 00:16:46 CET 2024


Sure, wouldn't mind seeing it added as a tool.  Most likely Andriy 
wasn't a member of the mailing list so it got canned.

I will say 
https://github.com/andrey-utkin/candelatech-vrf/blob/master/intercept.c#L30 
doesn't seem right, c-ares definitely provides cnames with 
ares_getaddrinfo().


On 3/13/24 6:48 PM, Ben Greear via c-ares wrote:
> I didn't see this show up on the list, so resending...
>
>
> -------- Forwarded Message --------
> Subject: New tool intercepting and overriding libc DNS calls
> Date: Thu, 22 Feb 2024 12:33:03 +0000
> From: Andriy Utkin <hello at autkin.net>
> To: c-ares at lists.haxx.se
> CC: Ben Greear <greearb at candelatech.com>
>
> Hi all,
>
> Under the direction and funding of Ben Greear of Candelatech, here is a
> new tool which is open source (MIT, same as c-ares) for the benefit of
> others.
>
> You LD_PRELOAD it to existing utilities, e.g. `ping`, and it changes the
> behaviour of getaddrinfo() so that you can control how the DNS queries
> happen:
>
> - which network interface is used,
> - which source IP address is used,
> - which DNS servers are used.
>
> There's not much complexity in the code as all these settings are
> in the established libcares API.
>
> The original use case is to support VRF
> https://en.wikipedia.org/wiki/Virtual_routing_and_forwarding
>
> Here it is:
> https://github.com/andrey-utkin/candelatech-vrf
>
> The intention is to share it, get feedback and improve it.
> Ideas for a name are also welcome :)
>
> Ben suggested to offer it as an addition to c-ares' src/tools/
> directory, which I think is a great idea.
>
> Please let us know what you think.
>


More information about the c-ares mailing list