Hi Mario,
On 14.03.2013 23:00, [email protected] wrote:
Hi,
I made a patch in connman that might be useful for others.
I noticed that connman has an option FallbackNameservers which is currently
only used in tethering mode.
Hmm, if I am reading the code correctly (this in 1.12), the
FallbackNameservers are appended to the available nameservers in
resolver.c. I do not think tethering mode has anything to do with this.
Or did you meant DNS proxy code where the FallbackNameservers are indeed
used.
I made a patch that also uses this the nameservers given with the
FallbackNameservers in case any other nameserver (returned by the DHCP server)
fails. This can be very useful in network where DNS requests to external
addresses are not forwarded.
Patch is made on connman 1.9 but is still valid on latest connman version.
I'll let community decide whether this is suitable for mainstream connman code
or just custom patch.
Mario Vitale
Few comments to the patch:
Please inline the patch (do not attach) so it is easier to review and
comment. Also no c++ comments in the code and line length < 80
I think the fix should be generalized a bit. In resolv.c the
FallbackNameservers are appended to the list of available nameservers.
Unfortunately they are not added to service nameserver list (because the
lifetime is 0). This means that all the users of the resolver
(timeserver.c, wpad.c, vpn-provider.c, vpn.c, gweb.c, etc) know nothing
about the FallbackNameservers.
Your fix only fixes the issue in one place. Perhaps we should fix the
FallbackNameserver handling in resolv.c/service.c instead.
Cheers,
Jukka
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman