From owner-freebsd-net@FreeBSD.ORG Tue Jun 3 21:53:51 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D672B6D5 for ; Tue, 3 Jun 2014 21:53:51 +0000 (UTC) Received: from mail-ve0-x230.google.com (mail-ve0-x230.google.com [IPv6:2607:f8b0:400c:c01::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 943E02F02 for ; Tue, 3 Jun 2014 21:53:51 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id jz11so7685986veb.21 for ; Tue, 03 Jun 2014 14:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ecr/RYdCDUo4x2t3AqgHy4gsZ1PN8+0ezLYnEjf3RR8=; b=KivPHt6+XcvciFXLyv2+YO34JtyH05MEvYKvxzGxbafStFCYvmDospgzvzbiP2gDHL TS0KPpy5fhAFH+OGIkdl0o+zq4Rq+Hhu+cEtHt1hYUkRfZQH/cbIjc2o6b9GUdWks153 lmVyA2xZnJgL8llnHGflSEFtlVN+90ukJjshtnPpUsLQI8lYaxbZukxYhSXTbsPYBe0h WDbSXo5XaSqHRhKDpWLa3fpSmWB/L57XzF76/38mI4EKLNc8PbY7JsbD0ntyTg4h1G92 302HSmqIP9IwhtaOxYx/KWZSVIOaMyxeeTR0LJtj3sqrvTbr5Maky5qkq6myX47JPZ5h D0Qw== MIME-Version: 1.0 X-Received: by 10.52.135.148 with SMTP id ps20mr3822742vdb.75.1401832430625; Tue, 03 Jun 2014 14:53:50 -0700 (PDT) Received: by 10.58.73.102 with HTTP; Tue, 3 Jun 2014 14:53:50 -0700 (PDT) Date: Tue, 3 Jun 2014 17:53:50 -0400 Message-ID: Subject: Query regarding net.inet.tcp.nolocaltimewait From: suraj sandhu To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 21:53:52 -0000 Hi, I am using FreeBsd 8.2 and the behavior I am trying to understand is why there is no final ACK being sent by the client if net.inet.tcp.nolocaltimewait is set. Due to this server side communication need to rely upon receiving the RST for clean-up. Especially in the cases where client port is reused soon after the the connection being closed, additional resets are triggered. 198 void 199 tcp_twstart (struct tcpcb *tp ) 200 { 201 struct tcptw *tw; 202 struct inpcb *inp = tp ->t_inpcb; 203 int acknow; 204 struct socket *so ; 205 206 INP_INFO_WLOCK_ASSERT (&V_tcbinfo ); */* tcp_tw_2msl_reset(). */* 207 INP_WLOCK_ASSERT (inp ); 208 209 if (V_nolocaltimewait && in_localip (inp ->inp_faddr )) { 210 tp = tcp_close (tp );<==== Closing the connection without sending Final ACK. 211 if (tp != NULL ) 212 INP_WUNLOCK (inp ); 213 return; 214 } ... ... I will really appreciate any feedback on it. -Suraj