Expression calculation bug?

Alexander Shikoff minotaur at crete.org.ua
Fri Dec 24 22:23:44 CET 2010


Hello,

There is possible bug in calculation of expressions.
Let's assume that bgp_path.first is a 32-bit ASN.

Then this line does not work:
bgp_community.add((MyASN,bgp_path.first-bgp_path.first/65536*65536));

It does not raise syntax error etc. but bird stops announces of prefix which 
the adding is applied to.

The following workaround works as expected:
t = bgp_path.first/65536;
t = bgp_path.first - t * 65536;
bgp_community.add((MyASN,t));

P.S. I'm still using version 1.2.4. Could someone check it with 1.2.5?

-- 
MINO-RIPE



More information about the Bird-users mailing list