Align the default EDNS buffer sizes with the DNS Day 2020 recommendations
Use 1232 as the default buffer size for outgoing queries. See https://dnsflagday.net/2020/ for details.
This commit is contained in:
parent
7895de879f
commit
550c566720
@ -28,7 +28,9 @@ use crate::rr::dnssec::Signer;
|
||||
use crate::rr::{DNSClass, Name, Record, RecordSet, RecordType};
|
||||
|
||||
// TODO: this should be configurable
|
||||
pub const MAX_PAYLOAD_LEN: u16 = 1500 - 40 - 8; // 1500 (general MTU) - 40 (ipv6 header) - 8 (udp header)
|
||||
// > An EDNS buffer size of 1232 bytes will avoid fragmentation on nearly all current networks.
|
||||
// https://dnsflagday.net/2020/
|
||||
pub const MAX_PAYLOAD_LEN: u16 = 1232;
|
||||
|
||||
/// A DNS Client implemented over futures-rs.
|
||||
///
|
||||
|
@ -18,7 +18,9 @@ use crate::op::{Message, MessageType, OpCode, Query};
|
||||
use crate::xfer::{DnsRequest, DnsRequestOptions, DnsResponse, SerialMessage};
|
||||
|
||||
// TODO: this should be configurable
|
||||
const MAX_PAYLOAD_LEN: u16 = 1500 - 40 - 8; // 1500 (general MTU) - 40 (ipv6 header) - 8 (udp header)
|
||||
// > An EDNS buffer size of 1232 bytes will avoid fragmentation on nearly all current networks.
|
||||
// https://dnsflagday.net/2020/
|
||||
const MAX_PAYLOAD_LEN: u16 = 1232;
|
||||
|
||||
/// The StreamHandle is the general interface for communicating with the DnsMultiplexer
|
||||
pub struct StreamHandle {
|
||||
|
Loading…
Reference in New Issue
Block a user