patch for confbase.Y/config.Y
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
On Mon, Nov 21, 2011 at 11:55:57PM +0100, Rasmus ?berg wrote:
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
This does not really work - non-extended communities cannot really contain 32 bit AS numbers, the patch just makes higher halfs of ASNs to overflow and mix. -- 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."
participants (2)
-
Ondrej Zajicek -
Rasmus Åberg