[En-Nut-Discussion] Problem with PPP and DNS

Harald Kipp harald.kipp at egnite.de
Fri May 3 11:43:04 CEST 2013


Hi Ole and Krzysztof,

On 29.04.2013 12:12, Ole Reinhardt wrote:
>> I noticed that DNS configuration (DNS servers' IP) obtained via PPP
>> connection is not used by for example NutDnsGetHostByName function. I
>> don't know if my patch is correct, but works :)


> Have you seen the ppp client example? There the DNS and default route
> are set manually after establishing the connection.
...
> user. At least on my PC I sometimes decide to _not_ take over the PPP
> client settings, but keep my default settings, especially if I just want
> to use the PPP connection to connect to let's say a remote sensor or
> something similar.

There is another disadvantage. Some apps may not be interested in DNS at
all, if they are using bare IP addresses. Adding the patch would blow up
their code significantly.

So, I'd at least recommend to make this configurable. Now the same
question pops up again and again: Should we make the new feature the
standard way and possibly break existing apps, or should we enable it
only via the Configurator?

After some time I personally came to following the conclusion: In almost
all cases make the new feature the standard. If an existing app breaks,
you can still disable it in the Configurator to make your app work again.

Doing it the other way round would add more and more items to the board
configuration files. Specifically in the PPP/DNS case, "normal" apps for
newer boards with more memory would have to explicitly enable that
options, just to please that "old stuff".

Remember the newlib/setenv case? All new toolchains required an option
to be set, just to please the old, bad newlib definition. Until we
finally decided to do it the other way, force old newlib builds to
enable an option to make them compile again.

Regards,

Harald




More information about the En-Nut-Discussion mailing list