Subject: Re: rsh -p broken (rcmd.c, anyone?)
To: None <>
From: Christos Zoulas <>
List: tech-net
Date: 10/16/2004 02:05:16
In article <Pine.GSO.4.61.0410160208430.26046@rfhpc8317>,
Hubert Feyrer <> wrote:
>aparently 'rsh -p' doesn't work in 2.0 while it works as expected on 
>1.6.x. Running on 2.0 with tcpdump in background, I get:
> 	vulab# rsh -p 9999 vulab2
> 	02:09:54.132547 vulab2vulab.881 > vulab2.3879: S
>3878241974:3878241974(0) win 32768 <mss 1460,nop,wscale
>0,nop,nop,timestamp 0 0> (DF)
> 	                                         ^^^^
>The point in giving it a port number is to really use that (I have a rshd 
>running on port 9999 on the target machine for some special stuff).
>Is anyone familiar with src/lib/libc/net to comment on why rcmd_af() 
>discards the port number, and maybe how to fix the code?

It is not discarding it; it is erroneously byte swapping it.

9999 = 270f
3879 = 0f27

Well, you broke it... it seems according to cvs annotate. Anyway, cvs update
and it is fixed now.