From owner-freebsd-net@FreeBSD.ORG Fri Mar 18 09:30:21 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6166F106566C for ; Fri, 18 Mar 2011 09:30:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 367498FC15 for ; Fri, 18 Mar 2011 09:30:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p2I9UKsf024029 for ; Fri, 18 Mar 2011 09:30:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p2I9UKtq024021; Fri, 18 Mar 2011 09:30:20 GMT (envelope-from gnats) Date: Fri, 18 Mar 2011 09:30:20 GMT Message-Id: <201103180930.p2I9UKtq024021@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Andrey Smagin Cc: Subject: Re: kern/155585: [tcp] [panic] tcp_output tcp_mtudisc loop until kernel panic X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrey Smagin List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2011 09:30:21 -0000 The following reply was made to PR kern/155585; it has been noted by GNATS. From: Andrey Smagin To: bug-followup@FreeBSD.org, samspeed@mail.ru Cc: Subject: Re: kern/155585: [tcp] [panic] tcp_output tcp_mtudisc loop until kernel panic Date: Fri, 18 Mar 2011 12:08:24 +0300 this patch solve my problem Index: sys/netinet/tcp_var.h =================================================================== --- sys/netinet/tcp_var.h (revision 219727) +++ sys/netinet/tcp_var.h (working copy) @@ -239,6 +239,7 @@ #define TF_ECN_SND_ECE 0x10000000 /* ECN ECE in queue */ #define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */ #define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */ +#define TF_WASMTUDISC 0x80000000 /* was in mtudiscovery */ #define IN_FASTRECOVERY(t_flags) (t_flags & TF_FASTRECOVERY) #define ENTER_FASTRECOVERY(t_flags) t_flags |= TF_FASTRECOVERY Index: sys/netinet/tcp_output.c =================================================================== --- sys/netinet/tcp_output.c (revision 219727) +++ sys/netinet/tcp_output.c (working copy) @@ -1288,8 +1288,15 @@ */ if (tso) tp->t_flags &= ~TF_TSO; + + if ( tp->t_flags & TF_WASMTUDISC ) // if EMSGSIZE after call tcp_mtudisc then return EHOSTUNREACH + return (EHOSTUNREACH); + + tp->t_flags |= TF_WASMTUDISC tcp_mtudisc(tp->t_inpcb, 0); + tp->t_flags &= ~TF_WASMTUDISC; return (0); + case EHOSTDOWN: case EHOSTUNREACH: case ENETDOWN: