[27302] in Athena Bugs
bogon setting of REMOTEHOST
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Sun Apr 5 22:13:08 2009
Message-Id: <4D4F717C-3832-4C11-829F-96239CA85B4C@mit.edu>
From: Ken Raeburn <raeburn@mit.edu>
To: bugs@mit.edu
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Date: Sun, 5 Apr 2009 22:12:47 -0400
X-Spam-Flag: NO
X-Spam-Score: 0.00
Errors-To: bugs-bounces@mit.edu
In one login session via IPv4 ssh:
% who ; printenv REMOTEHOST
raeburn pts/1 Apr 5 22:00 (c-66-30-113-194.hsd1.ma.comcast.net)
c-66-30-113-194.hsd1.ma.comcast.net
%
That's all well and fine. In another via IPv6 ssh:
% who ; printenv REMOTEHOST
raeburn pts/1 Apr 5 22:02 (2002:421e:71c2:1:21d:4fff:fe4b:648c)
2002
%
That's not so useful.
If I log in to a machine from itself, via IPv6, the source address
shows in "who" as "::1" and REMOTEHOST is not set at all. I don't
have a handy machine with an IPv4 address with no PTR record, or an
IPv6 address with a PTR record, to test with. My guess is that it's
chopping at the ":" for some reason. Maybe some assumption that "$
{REMOTEHOST}:foo" is supposed to be useful for some value of foo?
Except, with a REMOTEHOST of 2001 or 2002, it's not, so if the whole
address can't be used, it's probably better to just not set it (unless
its existence is more important as a flag than the utility as a name).
Seen on Athena Linux 9.4.53 and on linerva, today.
Ken