Skip Menu |

This queue is for tickets about the NetAddr-IP CPAN distribution.

Report information
The Basics
Id: 30195
Status: rejected
Priority: 0/
Queue: NetAddr-IP

People
Owner: Nobody in particular
Requestors: vernonnelson [...] cox.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: first and last address return error
Date: Mon, 22 Oct 2007 16:09:55 -0400
To: bug-NetAddr-IP [...] rt.cpan.org
From: Vernon Nelson <vernonnelson [...] cox.net>
the first & last returns on a /31 are incorrect.. this should return the network & broadcast... my $ip1 = new NetAddr::IP "192.168.0.0/255.255.255.254"; 192.168.0.0 - 192.168.0.1 = range 192.168.0.1/31 = first 192.168.0.0/31 = last
On Mon Oct 22 16:10:29 2007, vernonnelson@cox.net wrote: Show quoted text
> the first & last returns on a /31 are incorrect.. this should return > the network & broadcast... > > my $ip1 = new NetAddr::IP "192.168.0.0/255.255.255.254"; > 192.168.0.0 - 192.168.0.1 = range > 192.168.0.1/31 = first > 192.168.0.0/31 = last
A /31 contains no usable addresses so the first and last items are not meaningful First is the first address after the network address Last is the last address before the broadcast address The above is as close as you can get considering how a /31 wraps. Perhaps this is idiosyncratic but that is how it's defined