aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-08-20 19:12:59 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-08-20 19:15:50 +0200
commit524d2538537b2530bf031daa1d5c8e4653f92c5c (patch)
tree2fe33c96e9db0c6037ff0905a53337036bf15998 /lib
parenta297a4f044bcc7c38549710a720bc1f97df9ba65 (diff)
downloadbird-524d2538537b2530bf031daa1d5c8e4653f92c5c.tar.gz
BGP: Implement extended optional parameters length
Extends BGP options/capabilities data length to 16bit, to avoid issues with too many capabilities. See draft-ietf-idr-ext-opt-param-07
Diffstat (limited to 'lib')
-rw-r--r--lib/birdlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index 30ea433c..5202b0c8 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -38,7 +38,7 @@ struct align_probe { char x; long int y; };
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a)))
#define BYTES(n) ((((uint) (n)) + 7) / 8)
#define CALL(fn, args...) ({ if (fn) fn(args); })
-#define ADVANCE(w, r, l) ({ r -= l; w += l; })
+#define ADVANCE(w, r, l) ({ r -= (l); w += (l); })
static inline int uint_cmp(uint i1, uint i2)
{ return (int)(i1 > i2) - (int)(i1 < i2); }