+ if (!nm_streq (search, "~.")) {
len = strlen (search);
if (search[len - 1] == '.') search[len - 1] = 0;
+ }
this seems wrong, for example if "search" is "~..".
Either, do a full normalization and drop such entires (or clean up the duplicate dots). Or: normalize "~." to "~" too. It's odd that the special domain is treated entirely different regardingt the trailing dot.
> dns: use dns-priority to provide a preprocessed domain list to plugins
do we need to rebuild the list every time? We know when an update changes something. Can we cache the result, generate it when needed, and clear it when something changes?
> dns: dnsmasq: fix adding multiple domains
can you add a "Fixes" comment?
> core: allow '~.' domain in ip4 and ip6 configs
+ if (!nm_streq (search, "~.")) {
search[ len - 1] = 0;
len = strlen (search);
if (search[len - 1] == '.')
+ }
this seems wrong, for example if "search" is "~..".
Either, do a full normalization and drop such entires (or clean up the duplicate dots). Or: normalize "~." to "~" too. It's odd that the special domain is treated entirely different regardingt the trailing dot.
> dns: use dns-priority to provide a preprocessed domain list to plugins
_LOGD ("update-dns: updating plugin %s", plugin_name); domain_ lists (self); plugin_ update (plugin,
+ rebuild_
if (!nm_dns_
do we need to rebuild the list every time? We know when an update changes something. Can we cache the result, generate it when needed, and clear it when something changes?
+ struct {
+ const char **search;
+ char **reverse;
+ } domains;
} NMDnsIPConfigData;
I think these are leaked.
> dns: dnsmasq: honor dns-priority
+ int addr_family, i, j, num;
let's use guint for index variables of arrays? Also matches get_num_ nameservers (ip_config);
num = nm_ip_config_
> dns: sd-resolved: honor dns-priority
- NMIPConfig *ip_config = elem->data;
+ NMDnsIPConfigData *data = elem->data;
+ NMIPConfig *ip_config = data->ip_config;
this seems wrong.
Overall, lgtm