From owner-freebsd-net@freebsd.org Sat May 9 15:46:29 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEEAB2EDADA for ; Sat, 9 May 2020 15:46:29 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49KBPx4kdhz414c for ; Sat, 9 May 2020 15:46:29 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id A26552EDAD9; Sat, 9 May 2020 15:46:29 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A22E32EDAD8 for ; Sat, 9 May 2020 15:46:29 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 49KBPx31hHz414b for ; Sat, 9 May 2020 15:46:29 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id 049FkTcx018882 for ; Sat, 9 May 2020 10:46:29 -0500 (CDT) (envelope-from karels@FreeBSD.org) Message-Id: <202005091546.049FkTcx018882@mail.karels.net> To: net@freebsd.org From: Mike Karels Reply-to: karels@FreeBSD.org Subject: review for outgoing TCP port reuse MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18880.1589039189.1@mail.karels.net> Date: Sat, 09 May 2020 10:46:29 -0500 X-Rspamd-Queue-Id: 49KBPx31hHz414b X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.74 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.868,0]; NEURAL_HAM_LONG(-0.88)[-0.876,0]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.32 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2020 15:46:29 -0000 I just created a review with the following description: Allow TCP to reuse local port with different destinations Summary: Previously, tcp_connect() would bind a local port before connecting, forcing the local port to be unique across all outgoing TCP connections for the address family. Instead, choose a local port after selecting the destination and the local address, requiring only that the tuple is unique. The review is https://reviews.freebsd.org/D24781. The change originated on the Sidewinder firewall, which is proxy-based as well as packet-filter based, and needed to support more proxy connections than the pool of ephemeral ports as long as the destinations were different. Mike