Module Name: src
Committed By: he
Date: Thu Oct 18 14:30:54 UTC 2018
Modified Files:
src/external/bsd/bind/dist/lib/isc/unix: socket.c
Log Message:
Apply suggested fix from https://gitlab.isc.org/isc-projects/bind9/issues/589.
This would on NetBSD prevent UDP replies > 1432 bytes in size
transported over IPv4, because an IPv6 control message is applied
on an IPv4 socket, which will subsequently be refused. Therefore,
apply that control mssage only on IPv6 sockets.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/bind/dist/lib/isc/unix/socket.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/bind/dist/lib/isc/unix/socket.c
diff -u src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.23 src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.24
--- src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.23 Mon Aug 13 08:46:53 2018
+++ src/external/bsd/bind/dist/lib/isc/unix/socket.c Thu Oct 18 14:30:54 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: socket.c,v 1.23 2018/08/13 08:46:53 christos Exp $ */
+/* $NetBSD: socket.c,v 1.24 2018/10/18 14:30:54 he Exp $ */
/*
* Copyright (C) 2004-2018 Internet Systems Consortium, Inc. ("ISC")
@@ -1548,7 +1548,8 @@ build_msghdr_send(isc__socket_t *sock, i
#if defined(IPV6_USE_MIN_MTU)
if ((sock->type == isc_sockettype_udp) &&
- ((dev->attributes & ISC_SOCKEVENTATTR_USEMINMTU) != 0))
+ ((dev->attributes & ISC_SOCKEVENTATTR_USEMINMTU) != 0) &&
+ (sock->pf == AF_INET6))
{
int use_min_mtu = 1; /* -1, 0, 1 */