AS numbers higher than 2000000000

Milan Kocian milon at wq.cz
Mon Nov 18 15:40:49 CET 2013


On Mon, Nov 18, 2013 at 12:20:42PM +0100, Ondrej Zajicek wrote:
> On Fri, Nov 08, 2013 at 01:37:49PM +0100, Milan Kocian wrote:
> > hi,
> > 
> > I tried set up private 4b AS number (4200000000-4294967294). And I've discovered
> > that my filters using int datatype doesn't work with these numbers. The reason
> > is 'int' size (from -2000000000 to +2000000000).
> 
> Hello
> 
> It kind of works. Although arithmetic operations and print handles such
> numbers as signed, they are read as unsigned and could be used and
> compared without much problems. Numbers higher than 2147483647 are just
> mapped (overflow) to negative numbers.
> 
> Therefore expressions like these works:
> 
> i = 4200001234;
> if bgp_path.last = i then ...
> if bgp_path.last >= 4200000000 && bgp_path.last <= 4294967294 then ...
> 
> Although users have to be a bit careful (e.g. 4000000000 < 1 returns true).
> 

yes, when I revise my conditions, it works.

May be some note about this 'feature' in the documentation would be great ... :-)

regards,

-- 
Milan Kocian



More information about the Bird-users mailing list