Commit c6c09f77 authored by Mark Andrews's avatar Mark Andrews

2444. [port] Linux, FreeBSD, AIX: Turn of path mtu discovery

                        (clear DF) for UDP responses and requests.
parent 1de4dea9
2444. [port] Linux, FreeBSD, AIX: Turn of path mtu discovery
(clear DF) for UDP responses and requests.
2443. [bug] win32: UDP connect() would not generate an event,
and so connected UDP sockets would never clean up.
Fix this by doing an immediate WSAConnect() rather
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.302 2008/09/04 05:56:43 marka Exp $ */
/* $Id: socket.c,v 1.303 2008/09/23 02:20:21 marka Exp $ */
/*! \file */
......@@ -2031,6 +2031,27 @@ opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) {
#endif /* ISC_PLATFORM_HAVEIPV6 */
#endif /* defined(USE_CMSG) */
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
/*
* Turn off Path MTU discovery on IPv4/UDP sockets.
*/
if (sock->pf == AF_INET) {
int action = IP_PMTUDISC_DONT;
(void)setsockopt(sock->fd, IPPROTO_IP, IP_MTU_DISCOVER,
&action, sizeof(action));
}
#endif
#if defined(IP_DONTFRAG)
/*
* Turn off Path MTU discovery on IPv4/UDP sockets.
*/
if (sock->pf == AF_INET) {
int off = 0;
(void)setsockopt(sock->fd, IPPROTO_IP, IP_DONTFRAG,
&off, sizeof(off));
}
#endif
#if defined(SO_RCVBUF)
optlen = sizeof(size);
if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
......
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