1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

BGP: Use reallocation for capability structure

Instead of having large stack buffer for max amount of AFI/SAFI pairs.
The old code is not correct w.r.t. extendeded option length, as more
AFI/SAFI pairs may fit into the capability option.
This commit is contained in:
Ondrej Zajicek (work)
2019-08-21 17:16:08 +02:00
parent 524d253853
commit 4fa0e472cf
2 changed files with 30 additions and 16 deletions

View File

@@ -29,4 +29,6 @@ static inline u32 u32_hash(u32 v) { return v * 2902958171u; }
static inline u8 u32_popcount(u32 v) { return __builtin_popcount(v); }
static inline int uint_is_pow2(uint n) { return n && !(n & (n-1)); }
#endif