erl rejects FQN that begin with a digit

Patrick Baggett baggett.patrick@REDACTED
Wed Oct 20 13:50:55 CEST 2010


This one is probably a really quick fix...

Synopsis:
It seems Erlang doesn't like domain names that start with digits, in my
case, the domain "8fun.net"

(host1@REDACTED)5> tut17:start_ping(host2@REDACTED).
* 1: syntax error before: 8

(host1@REDACTED)6> tut17:start_ping(host2@REDACTED).  << Notice
the 8 is gone
<0.53.0>

(host1@REDACTED)7> tut17:start_ping(host2@REDACTED).  << 8 in
the middle works
<0.58.0>

(host1@REDACTED)8> tut17:start_ping(host2@REDACTED).  << 8 in
the end is fine, too
<0.61.0>

Expected:
Domain names that begin with a digit are legal and should be accepted.

Reproduce:
Use any FQN that has a domain name that begins with a digit.

Confirmed Version:
R14B built on OpenSuSE 11.3 from source, Windows XP SP3 from R14B binaries

Blind Guess:
Probably some code is looking to categorize a string based upon the first
character, when in reality, domain names can be represented by the RE
[a-zA-Z0-9]* or the C function isalnum(). Domain names don't need alpha
characters at all in the part before the TLD, e.g. 45.com

Background:
I created a simple internal LAN using the domain name of "8fun.net"
I've got DNS and DHCP working on this and I have two hosts, "test1.8fun.net"
and "test2.8fun.net" using 192.168.0.10 and .11 respectively. They can ping
each other by IP or hostname, and all is good with the world.


I started one with "erl -name host1" and I'm greeted with:
Erlang R14B (erts-5.8.1) [source] [64-bit] [smp:4:4] [rq:4]
[async-threads:0] [kernel-poll:false]

Eshell V5.8.1  (abort with ^G)
(host1@REDACTED)1>

No problem here.

Now, I want to send a message to a process, and I used the tutorial 17 to do
so (http://www.erlang.org/doc/getting_started/conc_prog.html , section 3.4).
This exports start_ping/1, where the first argument is the name of the node.
In short name mode, this works great, but in long name mode, Erlang chokes
on the FQN.


More information about the erlang-bugs mailing list