Fwd: New tool intercepting and overriding libc DNS calls

Ben Greear greearb at candelatech.com
Wed Mar 13 23:48:54 CET 2024


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