mirror of
https://github.com/systemd/systemd.git
synced 2024-11-30 22:03:41 +08:00
resolved: don't attempt to order empty answer array
This commit is contained in:
parent
351e6342d5
commit
fcf57f9cf7
@ -493,7 +493,8 @@ void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p) {
|
||||
if (r == 0)
|
||||
return;
|
||||
|
||||
dns_answer_order_by_scope(answer, in_addr_is_link_local(p->family, &p->sender) > 0);
|
||||
if (answer)
|
||||
dns_answer_order_by_scope(answer, in_addr_is_link_local(p->family, &p->sender) > 0);
|
||||
|
||||
r = dns_scope_make_reply_packet(s, DNS_PACKET_ID(p), DNS_RCODE_SUCCESS, p->question, answer, soa, &reply);
|
||||
if (r < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user