- Sussex, England
- https://luke-else.co.uk
-
Software Engineer and Student from South England
- Joined on
2022-02-07
Implemented in #2 by converting IPs to u32 and adding an additional u32 to each address to get the full range of subnets
And because of our current implementation and reliance of us being able to refuse IPv6 Addresses, it would be quite a large and complex change to get this to work.
Doing so would currently create a stack overflow because of a cross dependency between u32::from(IpAddr) and the IpAddr::to_arr() function
What I am currently thinking is the idea of converting an IP address to a 32 bit integer... and then using a window which what the CIDR allows the editing of. As a result, we cna just increment…
From here, I think the best way is to look at making a function that allows for IP address incrementation given the subnet mask.
So for example we use the base network, we can create an…
The problem comes from the network spacing variable. This only specifies the spacing in the last octet that has borrowed bits. What I mean by this is that any octets before this should have a…
I have fixed the overflow now, however, the logic still isn't quite right. When I create a subnet that has more than 8 borrowed bits, the addresses aren't quite incremented in the way that I would…
Could also look at a looping over an 8 bit segment of the CIDR's borrowed bits.