res_nquery for ipv6 DNS server issue on libc2-27.
Vishnu Prasad S K (Nokia)
vishnu.prasad_s_k@nokia.com
Mon Aug 28 11:55:19 GMT 2023
Hi Florian,
Thanks for your attention to this.
>>>> Are the IPv6 addresses that are incorrectly contacted listed in /etc/resolv.conf?
Yes the ip's are picked randomly from /etc/resolv.conf.
How to force res_nquery to use only the IP's we fill in _res._u._ext.nsaddrs??
Pasting the query again by removing hyperlinks.
We are using the below code to send DNS TXT query to specific ipv6 DNS server IP in "bootstrapDNS".
In libc2-21.so this piece of code is working fine TXT query would always go to bootstrapDNS server.
We upgraded to libc2-27, on top of this the below code is not working, res_nquery() is sending query to random IP's and not to bootstrapDNS server IP.
Is there any change in libc2-27 on using
We are using the below code to send DNS TXT query to specific ipv6 DNS server IP in "bootstrapDNS".
In libc2-21.so this piece of code is working fine TXT query would always go to bootstrapDNS server.
We upgraded to libc2-27, on top of this the below code is not working, res_nquery() is sending query to random IP's and not to bootstrapDNS server IP.
Is there any change in libc2-27 on using _res._u._ext.nsaddrs fields??
How to make our TXT query go to bootstrapDNS server on libc2-27?
_res._u._ext.nscount6 = 0;
_res.nscount = 0;
_res._u._ext.nsaddrs[0] = NULL;
res_init();
_res.options|=RES_ROTATE;
bootIn6->sin6_family = AF_INET6;
bootIn6->sin6_port = htons(53);
int ret = inet_pton(AF_INET6, bootstrapDNS.c_str(), bootIn6->sin6_addr.s6_addr);
OUTLOG_LEVEL(IKEMLOG_DETAIL, 7, "Boot DNS is IPv6, ret is %d",ret);
#if defined(HW_FAMILY_fsm9xxx)
_res.nscount = 3;
_res._u._ext.nscount6 = 3;
_res._u._ext.nscount = 0;
_res._u._ext.nsaddrs[0] = bootIn6;
_res._u._ext.nsaddrs[1] = bootIn6;
_res._u._ext.nsaddrs[2] = bootIn6;
_res._u._ext.nsmap[0] = MAXNS + 1;
_res._u._ext.nsmap[1] = MAXNS + 1;
_res._u._ext.nsmap[2] = MAXNS + 1;
res_nquery(&_res,fqdn, C_IN, T_TXT, answer, sizeof(answer));
Regards,
Vishnu.
-----Original Message-----
From: Florian Weimer <fweimer@redhat.com>
Sent: Monday, August 28, 2023 5:15 PM
To: Vishnu Prasad S K (Nokia) via Libc-alpha <libc-alpha@sourceware.org>
Cc: Vishnu Prasad S K (Nokia) <vishnu.prasad_s_k@nokia.com>
Subject: Re: res_nquery for ipv6 DNS server issue on libc2-27.
[You don't often get email from fweimer@redhat.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.
Vishnu,
your message is full of internal alcatel-lucent.com URLs and is therefore unreadable.
What you are seeing might be a side effect of /etc/resolv.conf auto-reloading. Are the IPv6 addresses that are incorrectly contacted listed in /etc/resolv.conf?
Thanks,
Florian
More information about the Libc-alpha
mailing list