From: Remi Gacogne Date: Wed, 23 Jan 2019 16:30:37 +0000 (+0100) Subject: Make sure that IP_PMTUDISC_DONT is defined X-Git-Tag: dnsdist-1.4.0-alpha2~8^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7076725587f1cf9ffa4c1321e9915aa14234eb3;p=pdns Make sure that IP_PMTUDISC_DONT is defined --- diff --git a/pdns/iputils.cc b/pdns/iputils.cc index de94bb2e5..474b8b484 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -138,6 +138,7 @@ int SSetsockopt(int sockfd, int level, int opname, int value) void setSocketIgnorePMTU(int sockfd) { +#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT) #ifdef IP_PMTUDISC_OMIT /* Linux 3.15+ has IP_PMTUDISC_OMIT, which discards PMTU information to prevent poisoning, but still allows fragmentation if the packet size exceeds the @@ -154,6 +155,7 @@ void setSocketIgnorePMTU(int sockfd) /* IP_PMTUDISC_DONT disables Path MTU discovery */ SSetsockopt(sockfd, IPPROTO_IP, IP_MTU_DISCOVER, IP_PMTUDISC_DONT); +#endif /* defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT) */ } bool HarvestTimestamp(struct msghdr* msgh, struct timeval* tv)