summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-24 20:36:02 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-03-25 11:38:53 +0900
commit729c5deb2eff2dbd3ecb62146379c132951e6351 (patch)
treeabd13f70510557aafee3e4b206a1acf074d0fae3
parenta2c69debd9983ec34000a8c5b79b24c13c6f9815 (diff)
downloadsystemd-729c5deb2eff2dbd3ecb62146379c132951e6351.tar.gz
systemd-729c5deb2eff2dbd3ecb62146379c132951e6351.tar.bz2
systemd-729c5deb2eff2dbd3ecb62146379c132951e6351.zip
resolved: don't suppress OPT if we have no OPTupstream
This is inspired by #18917. It suppresses a misleading log message about suppressing OPT where we might not actually have OPT.
-rw-r--r--src/resolve/resolved-dns-packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index abc978ab83..8de407d21a 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -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