1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-12 08:58:20 +03:00

resolved: whenever a link starts/stops being relevant flush global DNS caches

Let's add some protection for split horizon setups, where different
zones are visible on the same global DNS servers depending on where you
come from.

Fixes: #9196
This commit is contained in:
Lennart Poettering 2018-06-08 12:04:49 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3ad9705824
commit 63b1219130

View File

@ -115,6 +115,11 @@ void link_allocate_scopes(Link *l) {
dns_server_reset_features_all(l->manager->fallback_dns_servers);
dns_server_reset_features_all(l->manager->dns_servers);
/* Also, flush the global unicast scope, to deal with split horizon setups, where talking through one
* interface reveals different DNS zones than through others. */
if (l->manager->unicast_scope)
dns_cache_flush(&l->manager->unicast_scope->cache);
}
/* And now, allocate all scopes that makes sense now if we didn't have them yet, and drop those which we don't