Commit a61f2523 authored by Mark Andrews's avatar Mark Andrews
Browse files

4505. [port] Use IP_PMTUDISC_OMIT if available. [RT #35494]

parent 5f8412a4
4505. [port] Use IP_PMTUDISC_OMIT if available. [RT #35494]
4504. [security] Allow the maximum number of records in a zone to
be specified. This provides a control for issues
raised in CVE-2016-6170. [RT #42143]
......
......@@ -2858,11 +2858,24 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
/*
* Turn off Path MTU discovery on IPv4/UDP sockets.
* Prefer IP_PMTUDISC_OMIT over IP_PMTUDISC_DONT
* if it available.
*/
if (sock->pf == AF_INET) {
int action = IP_PMTUDISC_DONT;
(void)setsockopt(sock->fd, IPPROTO_IP, IP_MTU_DISCOVER,
&action, sizeof(action));
int action;
#ifdef defined(IP_PMTUDISC_OMIT)
action = IP_PMTUDISC_OMIT;
if (setsockopt(sock->fd, IPPROTO_IPV6,
IPV6_MTU_DISCOVER, &action,
sizeof(action)) < 0) {
#endif
action = IP_PMTUDISC_DONT;
(void)setsockopt(sock->fd, IPPROTO_IP,
IP_MTU_DISCOVER,
&action, sizeof(action));
#ifdef defined(IP_PMTUDISC_OMIT)
}
#endif
}
#endif
#if defined(IP_DONTFRAG)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment