On Tue, 22 Sep 2020 at 05:32, Denis Kenzior <denkenz(a)gmail.com> wrote:
On 9/21/20 2:04 PM, Andrew Zaborowski wrote:
> If no resolve method gets configured, the resolve_new() call in
> netconfig returns NULL. To avoid adding checks netconfig every time
> netconfig->resolve is used, add these checks directly in the resolve_*
> methods. Fixes the following crash:
Hmm, how exactly is this triggered? I'm fairly certain I made it so that
resolve module fails to start if the resolve method is mis-configured. See
resolv.c:568 or so.
Good point, it's because I don't have
General.enable_network_configuration so resolve_init() exits early.
I'm still using netconfig from P2P, I guess we shouldn't require
General.EnableNetworkConfiguration to be set for P2P. P2P doesn't
(usually) have DNS so this should still work but maybe the checks
should be in netconfig.c after all, not sure.
> Aborting (signal 11) [/path/iwd]
> ++++++++ backtrace ++++++++
> #0 0x7f3ee427f210 in /lib/x86_64-linux-gnu/libc.so.6
> #1 0x43bcf4 in resolve_revert() at src/resolve.c:85
I wonder why you crash here and not in .add_dns or .add_domain_name
Because the dhcp lease doesn't have DNS information.