18 Mar
2010
18 Mar
'10
8:43 p.m.
On Wed, Mar 17, 2010 at 04:34:22PM +0100, Wolfgang Hennerbichler wrote:
Like in IPv4 I have this: prefix set martians; { martians = [ 169.254.0.0/16+, 172.16.0.0/12+, 192.168.0.0/16+, 10.0.0.0/8+, 224.0.0.0/4+, 240.0.0.0/4+ ]; if net.ip = 0.0.0.0 then return false; # Avoid too short and too long prefixes if (net.len < 8) || (net.len > 30) then return false;
Just a note, you can replace these two tests by adding 0.0.0.0/32-, 0.0.0.0/0{0,7} and 0.0.0.0/0{31,32} to the martians prefix set. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."