summaryrefslogtreecommitdiff
path: root/src/resolve/org.freedesktop.resolve1.service
diff options
context:
space:
mode:
authorBenjamin Robin <benjarobin@users.noreply.github.com>2017-07-06 04:56:17 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-05 22:56:17 -0400
commit46a58596731684ba511b04ee9e8f7a9af490fbc2 (patch)
treebb220174a97739c702ab9b1627df87b2a435fc3e /src/resolve/org.freedesktop.resolve1.service
parent86086fce66f7c12168c7dfb699fb6dcc5b54a5f2 (diff)
downloadsystemd-46a58596731684ba511b04ee9e8f7a9af490fbc2.tar.gz
resolve: Try to remove the ambiguity about the mtu parameter of dns_packet_new (#6285)
Actually the caller of dns_packet_new() pass 0 or the data size of the UDP message. So try to reflect that, so rename the `mtu` parameter to `min_alloc_dsize`. In fact `mtu` is the size of the whole UDP message, including the UDP header, and here we just need to pass the size of data (without header). This was confusing. Also add a check on the requested allocated size, since some caller do not check what is really allocated. Indeed the function do not allocate more than DNS_PACKET_SIZE_MAX whatever the value of the `mtu` parameter.
Diffstat (limited to 'src/resolve/org.freedesktop.resolve1.service')
0 files changed, 0 insertions, 0 deletions