From: Daniel S. <moo...@av...> - 2008-05-10 03:01:34
|
Here is an interesting one that has been broken since AOLserver 4.0. In hosts.allow, you can use either a full or partial hostname, or ipaddr/netmask. Not all work. 192.168.0.10/255.255.255.255 <- Gives error "Invalid address or hostname "192.168.0.10". should be ipaddr/netmask or hostname" 192.168.0.10/255.255.255.0 <- This fixes the above -BUT- it allows in the whole class C, which may not really be what is wanted. bob.someserver.com <- this works (though haven't looked deep enough to see if it does sanity check on forward + reverse lookup to guarantee it is really the right host) The error is caused by inet_addr() returning INADDR_NONE on 255.255.255.255 . Using inet_aton() resolves this issue. A patch to nsperm.c at around line #739 follows: *slash = '\0'; if (inet_aton(net, &ip) == 0 || inet_aton(slash+1, &mask) == 0) { Tcl_AppendResult(interp, "invalid address or hostname \"", net, "\". " "should be ipaddr/netmask or hostname", NULL); goto fail; } Daniel -- | --------------------------------------------------------------- | Daniel P. Stasinski | http://www.saidsimple.com | moo...@av... | http://www.disabilities-r-us.com | XMMP: moo...@av... | http://www.avenues.org | Google Talk: mooooooo | http://www.scriptkitties.com |