bloghow2doitde

A blog about computer science and a life between Heidelberg and Munich

During my studies of the Border Gateway Protocol I did the very same like every guy playing around with raw BGP data dumps, I used libbgpdump of RIPE NCC to get the binary data into a readable format. But the tool is not maintained that well and so sometimes errors still occur during parsing the BGP dumps. At least one of them is easy to solve within a few seconds.

There can be errors about BGP messages with to many prefixes involved like [error] too many prefixes (1021 > 1000) there is easy was to get things done by changing bgpdump_attr.h as this very limit is hardcoded as #define MAX_PREFIXES 1000. Increasing this number and recompiling solves at least this problem. No message I saw so far included more than 2000 prefixes so usually it should work out with a hardcoded limit of 2000 prefixes.

If you’re lazy just apply the patch I created and recompile the sources.

(bgpdump_attr.h-patch) download
1
2
3
4
5
6
7
8
9
10
11
12
--- bgpdump_attr.h  2012-09-25 09:31:49.128344624 +0200
+++ bgpdump_attr.h.new  2012-09-25 09:31:25.783906823 +0200
@@ -212,7 +212,8 @@
     u_char        len;
 };

-#define MAX_PREFIXES 1000
+/* #define MAX_PREFIXES 1000 */
+#define MAX_PREFIXES 2000
 struct mp_nlri {
   u_char      nexthop_len;

posted in: Border Gateway Protocol, Linux, networking, patch