diff -Nru systemd-237/debian/changelog systemd-237/debian/changelog --- systemd-237/debian/changelog 2018-11-19 18:48:47.000000000 +0100 +++ systemd-237/debian/changelog 2018-11-29 15:23:04.000000000 +0100 @@ -1,3 +1,11 @@ +systemd (237-3ubuntu10.11) bionic; urgency=medium + + * d/p/increase-TCP-stub-payload-size.patch: Set TCP's payload size to + DNS_PACKET_SIZE_MAX instead of DNS_PACKET_UNICAST_SIZE_MAX when EDNS is + disabled (LP: #1804487) + + -- Victor Tapia Thu, 29 Nov 2018 15:23:04 +0100 + systemd (237-3ubuntu10.10) bionic; urgency=medium * debian/extra/start-udev: ignore failure to set sync parameter. diff -Nru systemd-237/debian/patches/increase-TCP-stub-payload-size.patch systemd-237/debian/patches/increase-TCP-stub-payload-size.patch --- systemd-237/debian/patches/increase-TCP-stub-payload-size.patch 1970-01-01 01:00:00.000000000 +0100 +++ systemd-237/debian/patches/increase-TCP-stub-payload-size.patch 2018-11-29 15:23:04.000000000 +0100 @@ -0,0 +1,34 @@ +commit e6eed9445956cfa496e1db933bfd3530db23bfce +Author: Victor Tapia +Date: Wed Nov 21 14:01:04 2018 +0100 + + resolved: Increase size of TCP stub replies + + DNS_PACKET_PAYLOAD_SIZE_MAX is limiting the size of the stub replies to + 512 with EDNS off or 4096 with EDNS on, without checking the protocol + used. This makes TCP replies for clients without EDNS support to be + limited to 512, making the truncate flag useless if the query result is + bigger than 512 bytes. + + This commit increases the size of TCP replies to DNS_PACKET_SIZE_MAX + + Fixes: #10816 + +--- a/src/resolve/resolved-dns-packet.h ++++ b/src/resolve/resolved-dns-packet.h +@@ -136,11 +136,14 @@ + + static inline uint16_t DNS_PACKET_PAYLOAD_SIZE_MAX(DnsPacket *p) { + +- /* Returns the advertised maximum datagram size for replies, or the DNS default if there's nothing defined. */ ++ /* Returns the advertised maximum size for replies, or the DNS default if there's nothing defined. */ + + if (p->opt) + return MAX(DNS_PACKET_UNICAST_SIZE_MAX, p->opt->key->class); + ++ if (p->ipproto == IPPROTO_TCP) ++ return DNS_PACKET_SIZE_MAX; ++ + return DNS_PACKET_UNICAST_SIZE_MAX; + } + diff -Nru systemd-237/debian/patches/series systemd-237/debian/patches/series --- systemd-237/debian/patches/series 2018-11-19 18:48:17.000000000 +0100 +++ systemd-237/debian/patches/series 2018-11-29 15:22:49.000000000 +0100 @@ -93,3 +93,4 @@ core-execute-environment_generators-with-manager-s-enviro.patch core-execute-generators-with-manager-s-environmnet.patch networkd-add-support-to-configure-IPv6-MTU-8664.patch +increase-TCP-stub-payload-size.patch