Hi all, I have a question regarding DNS lookup from an application using VCL. I'm working with an application that resolves hostnames to IP addresses using the gethostbyname() function. The applications interfaces to the Linux network stack using the epoll API and so seemed like a good candidate for using VCL with LD_PRELOAD. I'm well aware that this may not work but it's worth trying before looking at modifying the interface within the application.
The problem I have is that, when using the gethostbyname() function to resolve hostnames, there is no network traffic seen in the VPP network interface. Just to simplify the issue away from the application, the wget tool uses the same function to resolve hostnames. I can confirm that using wget with VCL does work when using an IP address in the URL. However, when passing the hostname in the URL an error occurs failing to resolve the hostname. Again, no packets are seen in VPP when this occurs. I have seen in [1] that the "Caching DNS name resolver" plugin has the ability to "override gethostbyname() in an LD_PRELOAD library" but I don't see any reference on how to override this. Is this the step that I am missing? Just to note, I do have DNS enabled in VPP and have a nameserver configured as 8.8.8.8. I can also cache DNS entries if I add them manually, but this has no impact on the application as there are no packets seen in VPP. Please let me know if any further information would be useful. Thanks, Anthony [1] https://s3-docs.fd.io/vpp/22.06/aboutvpp/featurelist.html
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22073): https://lists.fd.io/g/vpp-dev/message/22073 Mute This Topic: https://lists.fd.io/mt/94581374/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-