A-label definition

Mark Andrews Mark_Andrews at isc.org
Tue Jun 24 05:18:20 CEST 2008


> Mark Andrews wrote:
>  
> > Well you scripts are most probably already broken.
> 
> Yes, the missing IPv6 support is broken, OTOH the API
> doesn't support it.

	0x7f.0x01 is a IPv4 address for a large portion of the
	world.  If you have a host called 0x7f.0x01.example.com and
	a search list containg example.com the when someone attempts
	to telnet to 0x7f.0x01 it won't go to the address in the A
	record associated with 0x7f.0x01.example.com.  It will
	instead connect to 127.0.0.1.

	Lots of applications have something like the following.

		addr = inet_addr(argv[1]);
		if (addr != INADDR_NONE) {
			r = connect();
		} else {
			he = gethostbyname(argv[1]);
			i = 0;
			while {
				addr = he->h_addr[i];
				r = connect();
				if (r >= 0)
					break;
			} while (he->h_addr[++i] != NULL);
		}

	gethostbyname() itself may do a similar thing.

	Firefox accepts ftp://0x7f.0x1/ as if it was ftp://127.0.0.1/
	to give you a example of where it succeeds in a url.  I
	havn't looked to see at which level 0x7f.0x1 was treated as
	a raw address but it doesn't generate DNS lookups.

	YMMV  but you need to be aware of what applications on
	various platforms accept as valid IP addreses and steer
	clear of using anything which could be potentially confusing.

	I've see some platforms zero fill decimal numbers.  067 was
	treated as 67 not 55.  We have code to detect just such
	ambigious use.

	Mark
		
> > % telnet 0x7f.0x01
> > Trying 127.0.0.1...
> > telnet: connect to address 127.0.0.1: Connection refused
> > telnet: Unable to connect to remote host
> > %
> 
> D:\PROGRA~1\bin>rxgeturl 0x7f.0x01
>     +++ "WindowsNT COMMAND D:\Programme\bin\RXGETURL.REX"
> 113 *-*   if sign( verify( arg( 1 ), '0.123456789' )) = 0
>     >>>     "0"
> 
> 118 *-*     else
> 118 *-*       if SockGetHostByName( arg( 1 ), 'PEER.' ) = 0
>     >>>         "1"
> 
> 119 *-*         then
> 119 *-*           return RXMSG( 'unknown host' arg( 1 ) value( 'h_errno' ))
> 
> Found no host 0x7f.0x01, as expected.  
> 
>  Frank
> 
> _______________________________________________
> Idna-update mailing list
> Idna-update at alvestrand.no
> http://www.alvestrand.no/mailman/listinfo/idna-update
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews at isc.org


More information about the Idna-update mailing list