OpenSSH bases its decision on the length of a hostname in utmp record,
with a catch. At least on Linux, UT_HOSTSIZE is 256 but MAXHOSTNAMELEN
in kernel is set to 64. OpenSSH uses the latter, not the former. So if
your hostname is shorter than 64 characters, it will be canonicalized
and provided to PAM stack as rhost. If not, your IP address will be
provided.
On the other hand to even spoof a remote host attacker needs to know whichIt just need to be able to connect to your system multiple times, that's
host/IP is allowed to access and also which form is entered into LDAP.
all.