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). Does exist some other type for it (I didn't find anything in doc.) ? Best regards, -- Milan Kocian
On 8.11.2013 13:37, Milan Kocian wrote:
hi,
Hi! Good point. Wa are going to fix it. Ondrej
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).
Does exist some other type for it (I didn't find anything in doc.) ?
Best regards,
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@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."
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
participants (3)
-
Milan Kocian -
Ondrej Filip -
Ondrej Zajicek