patched, submitted. Thanks
Daniel Stasinski wrote:
> 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
>
--
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel