Ethereal-dev: Re: [ethereal-dev] Re: Adding NetInfo (ONC RPC proto) support to ethereal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Nicolas Williams <Nicolas.Williams@xxxxxxx>
Date: Wed, 5 Jan 2000 08:20:13 -0500
On Wed, Jan 05, 2000 at 07:55:17AM -0500, Nicolas Williams wrote:
> On Tue, Jan 04, 2000 at 11:09:23PM -0800, Guy Harris wrote:
> > > ***************
> > > *** 836,848 ****
> > >   		conversation = find_conversation(&null_address, &pi.dst,
> > >   		    pi.ptype, pi.srcport, pi.destport);
> > >   		if (conversation == NULL) {
> > > - 			conversation = find_conversation(&null_address,
> > > - 				&pi.dst, pi.ptype, 111, pi.destport);
> > >   			/* We haven't seen an RPC call for that conversation,
> > >   			   so we can't check for a reply to that call. */
> > > ! 			if (conversation == NULL) {
> > > ! 				return FALSE;
> > > ! 			}
> > >   		}
> > >   
> > >   		/* The XIDs of the call and reply must match. */
> > > --- 836,844 ----
> > >   		conversation = find_conversation(&null_address, &pi.dst,
> > >   		    pi.ptype, pi.srcport, pi.destport);
> > >   		if (conversation == NULL) {
> > >   			/* We haven't seen an RPC call for that conversation,
> > >   			   so we can't check for a reply to that call. */
> > > ! 			return FALSE;
> > >   		}
> > >   
> > >   		/* The XIDs of the call and reply must match. */
> > 
> > Yes, port 111 is the well-known port for the portmapper under TCP and
> > UDP, but is there a way of doing this without wiring that in?  (ONC RPC
> > can run atop other transports, although I don't know how often it's run
> > over, say, the OSI transport protocols.)
> 
> It has to be hardcoded because the Solaris rpcbind sends replies to
> indirect calls with a different source port. The Solaris rpcbind has a
> socket dedicated to handling indirect calls and does not specify a port
> number to the kernel at socket bind time; it uses this socket to: a)
> forward indirect calls to the target service, b) receive replies to the
> indirect RPC calls and c) to forward the replies back to the client.
> 
> I consider this a bug, but it's there and it's Sun's product; Sun, after
> all, is responsible for ONC RPC... :/

Actually, port 111 need only be hardcoded when dealing with ONC RPC over
UDP over IP. I'd meant to put in a BIG comment about the Solaris rpcbind
behaviour above that ugly code I put in that hardcode's port 111. How
can dissect_portmap_rmtcall*() find out wether the portmap RPC packet
was RPC over UDP over IP?

Nico

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.