Revert "resolved: drop unnecessary comparison (#6220)"
This reverts commit d718d20225
.
This commit is contained in:
parent
6f6165bf7d
commit
1f3e486fa7
|
@ -57,7 +57,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
|
|||
if (mtu < UDP_PACKET_HEADER_SIZE)
|
||||
a = DNS_PACKET_SIZE_START;
|
||||
else
|
||||
a = mtu;
|
||||
a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
|
||||
|
||||
/* round up to next page size */
|
||||
a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
|
||||
|
|
Loading…
Reference in a new issue