Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/netinet Pull up revision 1.128 (requested by tls in...



details:   https://anonhg.NetBSD.org/src/rev/91fcaaa378bb
branches:  netbsd-1-6
changeset: 530645:91fcaaa378bb
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Sep 05 13:42:31 2003 +0000

description:
Pull up revision 1.128 (requested by tls in ticket #1445):
path MTU discovery blackhole detection.
PR 12790 (sorry for not committing it for a long time)

diffstat:

 sys/netinet/tcp_subr.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 4a12b36fad2a -r 91fcaaa378bb sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c    Fri Sep 05 13:42:22 2003 +0000
+++ b/sys/netinet/tcp_subr.c    Fri Sep 05 13:42:31 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_subr.c,v 1.127.4.1 2002/07/02 06:55:16 lukem Exp $ */
+/*     $NetBSD: tcp_subr.c,v 1.127.4.2 2003/09/05 13:42:31 tron Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.127.4.1 2002/07/02 06:55:16 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.127.4.2 2003/09/05 13:42:31 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -844,7 +844,7 @@
 #ifdef INET
        case AF_INET:
                error = ip_output(m, NULL, ro,
-                   (ip_mtudisc ? IP_MTUDISC : 0),
+                   (tp && tp->t_mtudisc ? IP_MTUDISC : 0),
                    NULL);
                break;
 #endif
@@ -915,10 +915,13 @@
        switch (family) {
        case PF_INET:
                tp->t_inpcb = (struct inpcb *)aux;
+               tp->t_mtudisc = ip_mtudisc;
                break;
 #ifdef INET6
        case PF_INET6:
                tp->t_in6pcb = (struct in6pcb *)aux;
+               /* for IPv6, always try to run path MTU discovery */
+               tp->t_mtudisc = 1;
                break;
 #endif
        }
@@ -1420,7 +1423,7 @@
                notify = tcp_quench;
        else if (PRC_IS_REDIRECT(cmd))
                notify = in_rtchange, ip = 0;
-       else if (cmd == PRC_MSGSIZE && ip_mtudisc && ip && ip->ip_v == 4) {
+       else if (cmd == PRC_MSGSIZE && ip && ip->ip_v == 4) {
                /*
                 * Check to see if we have a valid TCP connection
                 * corresponding to the address in the ICMP message



Home | Main Index | Thread Index | Old Index