We have analyzed the issue and observed trying to open resolv.conf in "at" mode but
There is no such mode as "at" in C programming.
So We have experimented with "a+" "w+" etc but these did not work because of the
"resolv.conf" file resides in /etc directory in ROMFS,
ROMFS supports only "r" mode.
So modified the code as mentioned below.
stream = fopen(CONFIG_NETDB_RESOLVCONF_PATH, "at"); must be changed to
stream = fopen(CONFIG_NETDB_RESOLVCONF_PATH, "r");
With this change it is working properly.
Perhaps the original author intended "a+" (open for append/update)?
However, if the file is never written to, only read from, then "r" is
correct.
Just for completeness I looked through all other instances of fopen()
calls in nuttx and apps. This appears to be the only one with an
illegal mode string.
It is just some dumb typo of unknown origin at this point. The
/etc/resolve.conf logic has obviously never been built or tested so some
compile issues or odd behavior is not unexpected.
What is needed is a PR.