eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 967b7e75e3483c9bb2d17178237e7655c3f3beb2
parent b647f8e1f02214e2f554654c39b0a2277ca1b8a9
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Wed,  2 Dec 2020 10:57:57 -0600

resolve: Handle empty dns/domain lists

In the strange case that the dns list or the domain list are empty and
openresolv is being used, delete the openresolv entry instance instead
of trying to set it to an empty value

Diffstat:
Msrc/resolve.c | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/resolve.c b/src/resolve.c @@ -406,6 +406,14 @@ static void resolve_resolvconf_set_dns(struct resolve *resolve, char **dns_list) if (L_WARN_ON(!resolvconf_path)) return; + if (!dns_list || !dns_list[0]) { + if (rc->have_dns) + resolvconf_invoke(rc->ifname, "dns", NULL); + + rc->have_dns = false; + return; + } + content = l_string_new(0); for (; *dns_list; dns_list++) @@ -428,6 +436,14 @@ static void resolve_resolvconf_set_domains(struct resolve *resolve, if (L_WARN_ON(!resolvconf_path)) return; + if (!domain_list || !domain_list[0]) { + if (rc->have_domain) + resolvconf_invoke(rc->ifname, "domain", NULL); + + rc->have_domain = false; + return; + } + content = l_string_new(0); for (; *domain_list; domain_list++)