ports/70205: ports/net/datapipe shouldn't bind to listen address (with patch)

Helge Oldach datapipeaug04 at oldach.net
Mon Aug 9 11:30:24 UTC 2004


>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 at 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:



More information about the freebsd-ports-bugs mailing list