mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
resolve: synthesize null address, IPv4 broadcast address, or invalid domain
These are filtered in `dns_scope_good_domain()`, but not synthesized.
Fixes #22229.
(cherry picked from commit 46b53e8035
)
This commit is contained in:
parent
0fd3ccca64
commit
89b439ee00
@ -397,6 +397,14 @@ int dns_synthesize_answer(
|
|||||||
if (dns_name_is_empty(name)) {
|
if (dns_name_is_empty(name)) {
|
||||||
/* Do nothing. */
|
/* Do nothing. */
|
||||||
|
|
||||||
|
} else if (dns_name_endswith(name, "0.in-addr.arpa") > 0 ||
|
||||||
|
dns_name_equal(name, "255.255.255.255.in-addr.arpa") > 0 ||
|
||||||
|
dns_name_equal(name, "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa") > 0 ||
|
||||||
|
dns_name_endswith(name, "invalid") > 0) {
|
||||||
|
|
||||||
|
nxdomain = true;
|
||||||
|
continue;
|
||||||
|
|
||||||
} else if (is_localhost(name)) {
|
} else if (is_localhost(name)) {
|
||||||
|
|
||||||
r = synthesize_localhost_rr(m, key, ifindex, &answer);
|
r = synthesize_localhost_rr(m, key, ifindex, &answer);
|
||||||
|
Loading…
Reference in New Issue
Block a user