[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need a fix for this...



On Friday 29 March 2002 11:46 am, Billy Huddleston wrote:
> I found myself entering a x.x.x.65/29 block for a netblock address and
> NorthStar took it. We need to run checks against netblock entries to verify
> if they're indeed a valid Network Address.. It should have came back and
> said something like.. Invalid address and netmask. Also, it's possible to
> enter a 1989.xxx.xxx.xxx address.. Might wanna do some regex checks againt
> them as well.

Ok, I have committed the fixes to both of these problems.  To fix the first 
problem I added IP_CheckPrefix into util.lib to check a given net and mask 
length for validity.  AddNet calls this new function before adding the block 
and returns an error if something is wrong.

The second problem was just some regex stuff, both the ipv4addr and cidraddr 
regex's have been updated to be more correct.

Also.. added code to fix the bug with a Device being required on a new block 
that you talked about in your email to me earlier.  I will fix the doc bugs 
you sent in a bit later.


-- 
+---------------------------------+----------------------------+
| Hitesh Patel                    |  Lead Developer            |
| hitesh@presys.com               |  NorthStar                 |
+---------------------------------+----------------------------+
| NorthStar: http://www.brownkid.net/NorthStar/                |
| PGP Key:   http://www.brownkid.net/pgpkey.asc                |
+--------------------------------------------------------------+