Handling MED value

Ondrej Zajicek santiago at crfreenet.org
Thu Dec 22 13:46:35 CET 2011


On Mon, Dec 19, 2011 at 10:19:49AM +0900, Eiichiro Watanabe wrote:
>> You can write the function like this:
>>
>> function TEST()
>> int n;
>> {
>>    if (source = RTS_BGP) then {
>>      n = bgp_med + 100;
>>      if (n>= 0&&  n<  100) then
>>        bgp_med = n;
>>      else
>>        bgp_med = 4294967295;
>> }
>>
> uum..., It's strange.
> That fails on my environment.
> "bgp_med = 4294967295;" statement in line 93 also looks to fail.

I checked that and it fails in 64bit environment. You can use attached
code to fix it.

-- 
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: fix_large_numbers.patch
Type: text/x-diff
Size: 905 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20111222/100764cf/attachment-0001.patch>
-------------- 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/20111222/100764cf/attachment-0001.asc>


More information about the Bird-users mailing list