mirror of
https://github.com/systemd/systemd.git
synced 2025-02-22 09:57:34 +03:00
resolved: drop unused family argument from manager_routable()
This commit is contained in:
parent
014e8cc131
commit
de4a0138e7
@ -1156,12 +1156,16 @@ bool dns_scope_name_wants_search_domain(DnsScope *s, const char *name) {
|
||||
bool dns_scope_network_good(DnsScope *s) {
|
||||
/* Checks whether the network is in good state for lookups on this scope. For mDNS/LLMNR/Classic DNS scopes
|
||||
* bound to links this is easy, as they don't even exist if the link isn't in a suitable state. For the global
|
||||
* DNS scope we check whether there are any links that are up and have an address. */
|
||||
* DNS scope we check whether there are any links that are up and have an address.
|
||||
*
|
||||
* Note that Linux routing is complex and even systems that superficially have no IPv4 address might
|
||||
* be able to route IPv4 (and similar for IPv6), hence let's make a check here independent of address
|
||||
* family. */
|
||||
|
||||
if (s->link)
|
||||
return true;
|
||||
|
||||
return manager_routable(s->manager, AF_UNSPEC);
|
||||
return manager_routable(s->manager);
|
||||
}
|
||||
|
||||
int dns_scope_ifindex(DnsScope *s) {
|
||||
|
@ -1418,15 +1418,15 @@ void manager_dnssec_verdict(Manager *m, DnssecVerdict verdict, const DnsResource
|
||||
m->n_dnssec_verdict[verdict]++;
|
||||
}
|
||||
|
||||
bool manager_routable(Manager *m, int family) {
|
||||
bool manager_routable(Manager *m) {
|
||||
Link *l;
|
||||
|
||||
assert(m);
|
||||
|
||||
/* Returns true if the host has at least one interface with a routable address of the specified type */
|
||||
/* Returns true if the host has at least one interface with a routable address (regardless if IPv4 or IPv6) */
|
||||
|
||||
HASHMAP_FOREACH(l, m->links)
|
||||
if (link_relevant(l, family, false))
|
||||
if (link_relevant(l, AF_UNSPEC, false))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -185,7 +185,7 @@ DnsOverTlsMode manager_get_dns_over_tls_mode(Manager *m);
|
||||
|
||||
void manager_dnssec_verdict(Manager *m, DnssecVerdict verdict, const DnsResourceKey *key);
|
||||
|
||||
bool manager_routable(Manager *m, int family);
|
||||
bool manager_routable(Manager *m);
|
||||
|
||||
void manager_flush_caches(Manager *m);
|
||||
void manager_reset_server_features(Manager *m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user