mirror of
https://github.com/jedisct1/dnsblast.git
synced 2025-01-18 12:05:35 +00:00
Fragmentation is allowed only if packet size exceeds the outgoing interface MTU
This commit is contained in:
parent
ae6b9034b2
commit
22b6cb6c38
@ -197,7 +197,10 @@ get_sock(const char * const host, const char * const port,
|
|||||||
&(int[]) { MAX_UDP_BUFFER_SIZE }, sizeof (int));
|
&(int[]) { MAX_UDP_BUFFER_SIZE }, sizeof (int));
|
||||||
setsockopt(sock, SOL_SOCKET, SO_SNDBUFFORCE,
|
setsockopt(sock, SOL_SOCKET, SO_SNDBUFFORCE,
|
||||||
&(int[]) { MAX_UDP_BUFFER_SIZE }, sizeof (int));
|
&(int[]) { MAX_UDP_BUFFER_SIZE }, sizeof (int));
|
||||||
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
|
#if defined(IP_PMTUDISC_OMIT)
|
||||||
|
setsockopt(sock, IPPROTO_IP, IP_MTU_DISCOVER,
|
||||||
|
&(int[]) { IP_PMTUDISC_OMIT }, sizeof (int));
|
||||||
|
#elif defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
|
||||||
setsockopt(sock, IPPROTO_IP, IP_MTU_DISCOVER,
|
setsockopt(sock, IPPROTO_IP, IP_MTU_DISCOVER,
|
||||||
&(int[]) { IP_PMTUDISC_DONT }, sizeof (int));
|
&(int[]) { IP_PMTUDISC_DONT }, sizeof (int));
|
||||||
#elif defined(IP_DONTFRAG)
|
#elif defined(IP_DONTFRAG)
|
||||||
|
Loading…
Reference in New Issue
Block a user