You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Gregory Nutt <sp...@gmail.com> on 2020/03/12 13:11:25 UTC

Re: DNS Name Resolution Issue

> I am trying to test DNS Name resolution but observed issue of file opening fails while running.
>
> After debugging we have observed fails at following code:
> stream = fopen(CONFIG_NETDB_RESOLVCONF_PATH, "at");  in libs/libc/netdb/lib_dnsaddserver.c.
>
> 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.
>
> Kindly confirm our understanding.
That seems like a correct analysis.  Can you please submit a PR to 
https://github.com/apache/incubator-nuttx ?

Re: DNS Name Resolution Issue

Posted by Gregory Nutt <sp...@gmail.com>.
 > That seems like a correct analysis.  Can you please submit a PR to 
https://github.com/apache/incubator-nuttx ?

Sorry, that should have been https://github.com/apache/incubator-nuttx-apps/