From b7076725587f1cf9ffa4c1321e9915aa14234eb3 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 23 Jan 2019 17:30:37 +0100 Subject: [PATCH] Make sure that IP_PMTUDISC_DONT is defined --- pdns/iputils.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdns/iputils.cc b/pdns/iputils.cc index de94bb2e5f..474b8b484b 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) -- 2.47.2