resolved: ignore DNSSEC= option when resolved is built without gcrypt (#6084)
Fixes #5583.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
a1bb2402cb
commit
42303dcb1a
@@ -246,6 +246,12 @@ int manager_parse_config_file(Manager *m) {
|
||||
return r;
|
||||
}
|
||||
|
||||
#ifndef HAVE_GCRYPT
|
||||
if (m->dnssec_mode != DNSSEC_NO) {
|
||||
log_warning("DNSSEC option cannot be enabled or set to allow-downgrade when systemd-resolved is built without gcrypt support. Turning off DNSSEC support.");
|
||||
m->dnssec_mode = DNSSEC_NO;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -313,6 +313,12 @@ void link_set_dnssec_mode(Link *l, DnssecMode mode) {
|
||||
|
||||
assert(l);
|
||||
|
||||
#ifndef HAVE_GCRYPT
|
||||
if (mode == DNSSEC_YES || mode == DNSSEC_ALLOW_DOWNGRADE)
|
||||
log_warning("DNSSEC option for the link cannot be enabled or set to allow-downgrade when systemd-resolved is built without gcrypt support. Turning off DNSSEC support.");
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (l->dnssec_mode == mode)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user