]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-dns-packet.c
resolved: do not allocate packets with minimum size
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 27 Jun 2017 18:20:00 +0000 (14:20 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 27 Jun 2017 21:01:24 +0000 (17:01 -0400)
commit88795538726a5bbfd9efc13d441cb05e1d7fc139
tree21611d5cd02f7135230150caac088a82612505c5
parentdb848813bae4d28c524b3b6a7dad135e426659ce
resolved: do not allocate packets with minimum size

dns_packet_new() is sometimes called with mtu == 0, and in that case we should
allocate more than the absolute minimum (which is the dns packet header size),
otherwise we have to resize immediately again after appending the first data to
the packet.

This partially reverts the previous commit.
src/resolve/resolved-dns-packet.c