Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/bind/dist/lib/isc/unix Apply suggested fix from...



details:   https://anonhg.NetBSD.org/src/rev/362e26d72aba
branches:  trunk
changeset: 445223:362e26d72aba
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 18 14:30:54 2018 +0000

description:
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.

diffstat:

 external/bsd/bind/dist/lib/isc/unix/socket.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r f901edea132b -r 362e26d72aba external/bsd/bind/dist/lib/isc/unix/socket.c
--- a/external/bsd/bind/dist/lib/isc/unix/socket.c      Thu Oct 18 13:33:10 2018 +0000
+++ b/external/bsd/bind/dist/lib/isc/unix/socket.c      Thu Oct 18 14:30:54 2018 +0000
@@ -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 @@
 
 #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 */
 



Home | Main Index | Thread Index | Old Index