patch for confbase.Y/config.Y

Rasmus Åberg rasmus.aberg at qbrick.com
Mon Nov 21 23:55:57 CET 2011


Yo!

Ran into an issue where I couldn't use a function with 32 bit AS numbers. Made the following changes and got it working:

bash-4.1# diff conf/confbase.Y ../bird-1.3.2/conf/confbase.Y
30c30
< check_u32(unsigned val)
---
> check_u16(unsigned val)
32,33c32,33
<   if (val > 0xFFFFFFFF)
<     cf_error("Value %d out of range (0-4294967295)", val);
---
>   if (val > 0xFFFF)
>     cf_error("Value %d out of range (0-65535)", val);

bash-4.1# diff filter/config.Y ../bird-1.3.2/filter/config.Y
307c307
<    term { $$ = f_eval_int($1); check_u32($$); }
---
>    term { $$ = f_eval_int($1); check_u16($$); }
420c420
<           check_u32($2->a2.i); check_u32($4->a2.i);
---
>           check_u16($2->a2.i); check_u16($4->a2.i);

Feel free to use it :)

//Rasmus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20111121/adb7fbfb/attachment.html>


More information about the Bird-users mailing list