Fwd: Re: [AG-TECH] Unicast issues with vic/rat

Robert Olson olson at mcs.anl.gov
Mon Jan 26 20:50:21 CST 2004


Aha, cool. We should get this applied to the AG vic; should reduce the 
firewall problems that folks are having.

--bob

>Date: Mon, 26 Jan 2004 18:44:27 -0800
>From: Andrew Swan <aswan at cs.berkeley.edu>
>To: Don Morton <Don.Morton at umontana.edu>
>Cc: "Sergeant A. G. Tech" <ag-tech at mcs.anl.gov>,
>    Jennifer Parham <jparham at cs.clemson.edu>, jeh at cs.clemson.edu,
>    westall at cs.clemson.edu, Dan Schmiedt <willys at clemson.edu>,
>    ron_crummett at hotmail.com
>Subject: Re: [AG-TECH] Unicast issues with vic/rat
>Mail-Followup-To: Don Morton <Don.Morton at umontana.edu>,
>         "Sergeant A. G. Tech" <ag-tech at mcs.anl.gov>,
>         Jennifer Parham <jparham at cs.clemson.edu>, jeh at cs.clemson.edu,
>         westall at cs.clemson.edu, Dan Schmiedt <willys at clemson.edu>,
>         ron_crummett at hotmail.com
>User-Agent: Mutt/1.4.1i
>X-Spam-Status: No, hits=-5.4 required=5.0
>         tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,
>               REPLY_WITH_QUOTES,USER_AGENT_MUTT
>         version=2.55
>X-Spam-Level:
>X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
>Sender: owner-ag-tech at mcs.anl.gov
>X-Whitelist-by-bob: yes
>
>Don Morton wrote:
> > For some reason, there are folks who are trying
> > to unicast in, and the end result seems to be that
> > "we" can see them, but they can't see us.  Note
> > that there's no multicast involved here - in one case,
> > the bridge is simply being used as a "rendezvous point"
> > for two unicast streams, but the same problems occur -
> > I seem to be able to see/hear the remote site, but they
> > can't see/hear me.
> >
> > [...]
> >
> > My vague understanding of vic/rat, used with the QuickBridge,
> > is that the clients send UDP datagrams out to the bridge on ports
> > in the 50000 range, and they seem to receive UDP datagrams on
> > ports in the 32000 range, and it "should" be that simple.
>
>i'm not sure about rat but vic in unicast mode sends and
>receives on the same port, which is specified on the
>command line.  (the ports in your example were in the
>50000 range).  the source port in packets sent from vic
>will be an "ephemeral port" chosen by the operating system
>which is likely what you are referring to as in the 32000
>range.
>
>the behavior you describe is consistent with a nat or a
>firewall that builds dynamic rules that assumes vic will
>receive packets on the same port that it sends them from.
>
>for example, if the remote person joins your quickbridge
>on port 50186, they start sending packets from source port
>32456 (or some other port chosen by their operating system,
>but not port 50186).  upon seeing these packets, the nat or
>firewall installs a rule to forward packets from source port
>50186 on the quickbridge addressed to destination port 32456
>back to the remote participant.  however, quickbridge is
>sending packets to destination port 50186 so they never
>reach the remote site.
>
>probably the easiest way to verify that this is the problem
>is to rebuild vic with the attached patch and run the
>modified version at the remote site.  or if you have openmash
>vic installed, you can just add the flag "-rtptv" to the vic
>command line to get the same effect.
>
>-Andrew
>
-------------- next part --------------
*** net/net-ip.cpp.orig	Mon Jan 26 18:38:58 2004
--- net/net-ip.cpp	Mon Jan 26 18:41:45 2004
***************
*** 421,427 ****
  	nonblock(fd);
  
  
! #ifdef WIN32
  	memset((char *)&sin, 0, sizeof(sin));
  	sin.sin_family = AF_INET;
  	sin.sin_port = 0;
--- 421,439 ----
  	nonblock(fd);
  
  
! #define NO_EPHEMERAL_SOURCE_PORT
! #ifdef NO_EPHEMERAL_SOURCE_PORT
! 	memset((char*)&sin, 0, sizeof sin);
! 	sin.sin_family = AF_INET;
! 	sin.sin_port = port;
! 	sin.sin_addr.s_addr = INADDR_ANY;
! 	if (bind(fd, (struct sockaddr*)&sin, sizeof sin) < 0) {
! 		perror("bind");
! 		exit(1);
! 	}
! #endif
! 
! #if defined(WIN32) && !defined(NO_EPHEMERAL_SOURCE_PORT)
  	memset((char *)&sin, 0, sizeof(sin));
  	sin.sin_family = AF_INET;
  	sin.sin_port = 0;
***************
*** 431,436 ****
--- 443,449 ----
  		exit(1);
  	}
  #endif
+ 
  	memset((char *)&sin, 0, sizeof(sin));
  	sin.sin_family = AF_INET;
  	sin.sin_port = port;


More information about the ag-dev mailing list