AS numbers higher than 2000000000
Ondrej Zajicek
santiago at crfreenet.org
Mon Nov 18 12:20:42 CET 2013
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).
--
Elen sila lumenn' omentielvo
Ondrej 'SanTiago' Zajicek (email: santiago at 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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20131118/b9b480b3/attachment-0001.asc>
More information about the Bird-users
mailing list