From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Aug 9 11:30:24 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1AD616A4CE for ; Mon, 9 Aug 2004 11:30:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7C5743D48 for ; Mon, 9 Aug 2004 11:30:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i79BUNmr085030 for ; Mon, 9 Aug 2004 11:30:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i79BUNcA085029; Mon, 9 Aug 2004 11:30:23 GMT (envelope-from gnats) Resent-Date: Mon, 9 Aug 2004 11:30:23 GMT Resent-Message-Id: <200408091130.i79BUNcA085029@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Helge Oldach Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1B9416A4CE; Mon, 9 Aug 2004 11:28:59 +0000 (GMT) Received: from sep.oldach.net (p5081C48F.dip0.t-ipconnect.de [80.129.196.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57BAF43D49; Mon, 9 Aug 2004 11:28:56 +0000 (GMT) (envelope-from hmo@sep.oldach.net) Received: from sep.oldach.net (localhost [127.0.0.1])i79BSQV4044280 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Mon, 9 Aug 2004 13:28:44 +0200 (CEST) (envelope-from hmo@sep.oldach.net) Received: (from hmo@localhost) by sep.oldach.net (8.12.11/8.12.11/Submit) id i79BSPZS044279; Mon, 9 Aug 2004 13:28:25 +0200 (CEST) (envelope-from hmo) Message-Id: <200408091128.i79BSPZS044279@sep.oldach.net> Date: Mon, 9 Aug 2004 13:28:25 +0200 (CEST) From: Helge Oldach To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 X-Mailman-Approved-At: Mon, 09 Aug 2004 12:08:26 +0000 cc: roam@FreeBSD.org Subject: ports/70205: ports/net/datapipe shouldn't bind to listen address (with patch) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Helge Oldach List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2004 11:30:24 -0000 >Number: 70205 >Category: ports >Synopsis: ports/net/datapipe shouldn't bind to listen address (with patch) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Aug 09 11:30:23 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Helge Oldach >Release: FreeBSD 4.10-STABLE i386 >Organization: >Environment: System: FreeBSD localhost 4.10-STABLE FreeBSD 4.10-STABLE #1945: Sun Aug 1 13:39:01 CEST 2004 toor@localhost:/usr/obj/usr/src/sys/GENERIC i386 >Description: ports/net/datapipe is currently using the address it listens on as the address for outgoing connections. This is a problem for multi-homed hosts, where the outgoing address normally should be assigned according to the routing table. For example consider a multi-homed host with interfaces 10.0.0.1/24 and 10.1.1.1/24 datapipe 10.0.0.1 100 10.1.1.219 100 would listen on 10.0.0.1 and forward incoming sessions to host 10.1.1.219, using the source address 10.0.0.1 for the forwarded TCP session. It should however use the address of the outgoing interface, that is 10.1.1.1. >How-To-Repeat: >Fix: --- datapipe.c.ORIG Tue Jan 4 07:48:55 2000 +++ datapipe.c Mon Aug 9 13:10:56 2004 @@ -164,9 +164,10 @@ } - /* change the port in the listener struct to zero, since we will - * use it for binding to outgoing local sockets in the future. */ + /* change the port and address in the listener struct to zero, since we will + * use it for binding to outgoing local sockets and address in the future. */ laddr.sin_port = htons(0); + laddr.sin_addr.s_addr = INADDR_ANY; /* fork off into the background. */ >Release-Note: >Audit-Trail: >Unformatted: