mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 16:21:26 +03:00
resolved: reduce indentation level a bit
This commit is contained in:
parent
13eb76ef06
commit
1d123e772d
@ -281,16 +281,15 @@ void dns_server_packet_received(DnsServer *s, int protocol, DnsServerFeatureLeve
|
|||||||
if (s->packet_bad_opt && level >= DNS_SERVER_FEATURE_LEVEL_EDNS0)
|
if (s->packet_bad_opt && level >= DNS_SERVER_FEATURE_LEVEL_EDNS0)
|
||||||
level = DNS_SERVER_FEATURE_LEVEL_EDNS0 - 1;
|
level = DNS_SERVER_FEATURE_LEVEL_EDNS0 - 1;
|
||||||
|
|
||||||
/* Even if we successfully receive a reply to a request announcing support for large packets,
|
/* Even if we successfully receive a reply to a request announcing support for large packets, that
|
||||||
that does not mean we can necessarily receive large packets. */
|
* does not mean we can necessarily receive large packets. */
|
||||||
if (level == DNS_SERVER_FEATURE_LEVEL_LARGE)
|
if (level == DNS_SERVER_FEATURE_LEVEL_LARGE)
|
||||||
level = DNS_SERVER_FEATURE_LEVEL_LARGE - 1;
|
level = DNS_SERVER_FEATURE_LEVEL_LARGE - 1;
|
||||||
|
|
||||||
dns_server_verified(s, level);
|
dns_server_verified(s, level);
|
||||||
|
|
||||||
/* Remember the size of the largest UDP packet we received from a server,
|
/* Remember the size of the largest UDP packet we received from a server, we know that we can always
|
||||||
we know that we can always announce support for packets with at least
|
* announce support for packets with at least this size. */
|
||||||
this size. */
|
|
||||||
if (protocol == IPPROTO_UDP && s->received_udp_packet_max < size)
|
if (protocol == IPPROTO_UDP && s->received_udp_packet_max < size)
|
||||||
s->received_udp_packet_max = size;
|
s->received_udp_packet_max = size;
|
||||||
}
|
}
|
||||||
@ -299,15 +298,16 @@ void dns_server_packet_lost(DnsServer *s, int protocol, DnsServerFeatureLevel le
|
|||||||
assert(s);
|
assert(s);
|
||||||
assert(s->manager);
|
assert(s->manager);
|
||||||
|
|
||||||
if (s->possible_feature_level == level) {
|
if (s->possible_feature_level != level)
|
||||||
if (protocol == IPPROTO_UDP)
|
return;
|
||||||
s->n_failed_udp++;
|
|
||||||
else if (protocol == IPPROTO_TCP) {
|
if (protocol == IPPROTO_UDP)
|
||||||
if (DNS_SERVER_FEATURE_LEVEL_IS_TLS(level))
|
s->n_failed_udp++;
|
||||||
s->n_failed_tls++;
|
else if (protocol == IPPROTO_TCP) {
|
||||||
else
|
if (DNS_SERVER_FEATURE_LEVEL_IS_TLS(level))
|
||||||
s->n_failed_tcp++;
|
s->n_failed_tls++;
|
||||||
}
|
else
|
||||||
|
s->n_failed_tcp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user