mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
resolved: don't suppress OPT if we have no OPT
This is inspired by #18917. It suppresses a misleading log message about suppressing OPT where we might not actually have OPT.
This commit is contained in:
committed by
Yu Watanabe
parent
a2c69debd9
commit
729c5deb2e
@@ -2271,7 +2271,7 @@ static int dns_packet_extract_answer(DnsPacket *p, DnsAnswer **ret_answer) {
|
||||
bool cache_flush = false;
|
||||
size_t start;
|
||||
|
||||
if (p->rindex == p->size) {
|
||||
if (p->rindex == p->size && p->opt) {
|
||||
/* If we reached the end of the packet already, but there are still more RRs
|
||||
* declared, then that's a corrupt packet. Let's accept the packet anyway, since it's
|
||||
* apparently a common bug in routers. Let's however suppress OPT support in this
|
||||
|
||||
Reference in New Issue
Block a user