From owner-freebsd-net@FreeBSD.ORG Thu Mar 14 01:12:36 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BBC96753 for ; Thu, 14 Mar 2013 01:12:36 +0000 (UTC) (envelope-from mattmiller1@gmail.com) Received: from mail-qe0-f41.google.com (mail-qe0-f41.google.com [209.85.128.41]) by mx1.freebsd.org (Postfix) with ESMTP id 81950BE0 for ; Thu, 14 Mar 2013 01:12:36 +0000 (UTC) Received: by mail-qe0-f41.google.com with SMTP id 6so997872qeb.14 for ; Wed, 13 Mar 2013 18:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Ohgbj/LZ+Z1EVf+O/qhI9BmJtQuN9+IPlUomswTuMow=; b=Dt1Tl8baZ+Env6LFLBnO9lgyRNIrMxW+tHY3wLdN5ELduG/VPX29GTJ5nwSDxS09qO vpdid9qjYncO47eVhsAqLhkE1bwgGMLb3W36ExU/owzbNCzBQ4Zr1jLH3dQH9cwcLXgF P56yTLR4CBG1u/1KiqzMN65o5sylSkXriP8KJ1NXFKu/czP6KW1yrf5jHgjLhF6qu1tY YjKjFjSfcmyjIFxlcM/YY6+BfLSZj0aS4+uiMnqOi/m9SNARdgnKwzk40ftihMu6NMW1 Cp091WK0dQ9J7nFkDddwC4Nq/p8pl0njnX5M5sSQbUsASSBY7BQiPSHm2mWUJTORn2kL WW+g== X-Received: by 10.224.10.141 with SMTP id p13mr1317684qap.91.1363223550087; Wed, 13 Mar 2013 18:12:30 -0700 (PDT) MIME-Version: 1.0 Sender: mattmiller1@gmail.com Received: by 10.49.24.166 with HTTP; Wed, 13 Mar 2013 18:11:49 -0700 (PDT) In-Reply-To: <8D29B9DE-A59B-483D-92AD-30B794BD5417@mac.com> References: <8D29B9DE-A59B-483D-92AD-30B794BD5417@mac.com> From: Matt Miller Date: Wed, 13 Mar 2013 21:11:49 -0400 X-Google-Sender-Auth: 2w9vkFeTdSsNJk7sRkCALe67hNs Message-ID: Subject: Re: ip_output() Error Handling in tcp_output() To: Chuck Swiger Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 01:12:36 -0000 On Wed, Mar 13, 2013 at 3:35 PM, Chuck Swiger wrote: > Hi-- > > On Mar 13, 2013, at 8:21 AM, Matt Miller wrote: >> If we have a connection that has received a SYN and ip_output() >> returns, say, EHOSTUNREACH, is there anything that guarantees the >> connection would always eventually be dropped if the condition >> persists? > > If the local TCP stack is unable to reply with a SYN-ACK, then it hasn't established a connection yet because it cannot proceed through the 3WHS to ESTAB. It will stay in LISTEN state. > Sorry, I should have been more specific: say the connection has already progressed to at least ESTABLISHED or beyond when the ip_output() error occurs. So, we'll hit the TCPS_HAVERCVDSYN if block below: case EHOSTDOWN: case EHOSTUNREACH: case ENETDOWN: case ENETUNREACH: if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_softerror = error; return (0); } Thanks, Matt > Regards, > -- > -Chuck >