mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
4505. [port] Use IP_PMTUDISC_OMIT if available. [RT #35494]
This commit is contained in:
parent
5f8412a4cb
commit
a61f252391
2
CHANGES
2
CHANGES
@ -1,3 +1,5 @@
|
|||||||
|
4505. [port] Use IP_PMTUDISC_OMIT if available. [RT #35494]
|
||||||
|
|
||||||
4504. [security] Allow the maximum number of records in a zone to
|
4504. [security] Allow the maximum number of records in a zone to
|
||||||
be specified. This provides a control for issues
|
be specified. This provides a control for issues
|
||||||
raised in CVE-2016-6170. [RT #42143]
|
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)
|
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
|
||||||
/*
|
/*
|
||||||
* Turn off Path MTU discovery on IPv4/UDP sockets.
|
* 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) {
|
if (sock->pf == AF_INET) {
|
||||||
int action = IP_PMTUDISC_DONT;
|
int action;
|
||||||
(void)setsockopt(sock->fd, IPPROTO_IP, IP_MTU_DISCOVER,
|
#ifdef defined(IP_PMTUDISC_OMIT)
|
||||||
&action, sizeof(action));
|
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
|
#endif
|
||||||
#if defined(IP_DONTFRAG)
|
#if defined(IP_DONTFRAG)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user