hosts.allow not always working... misses some IPs

Peter Pentchev roam at ringlet.net
Wed Dec 3 00:45:28 PST 2003


On Tue, Dec 02, 2003 at 04:42:37PM -0500, Kerry B. Rogers wrote:
> Uwe, one other thing...
> 
> smtp : 213.194.064.0/255.255.192.0 : deny
> 
> did not block 213.194.124.93...
> 
> It should have, shouldn't it?

Not with 64 misspelled as 064; it is a little-known fact that most
implementations of the inet_addr() or inet_aton() system library
functions (which are used to convert a numeric representation of an IP
address into the internal format used by the network functions) will
accept hexadecimal (prefixed with 0x) or octal (prefixed with 0)
numbers.  Thus, the 064 in your address was treated as an octal number,
converted to 52, and your specification was misinterpreted as
213.194.52.0/255.255.192.0.

HTH, HAND.

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net    roam at sbnd.net    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
Thit sentence is not self-referential because "thit" is not a word.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bugs/attachments/20031203/10937bce/attachment.bin


More information about the freebsd-bugs mailing list