Implement RFC 8050/7911 MRT Additional Path extension #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on CAIDA/libparsebgp#82
Fixes CAIDA/libparsebgp#76
There were several options for how to format the new addtional path id field in bgpreader -e output. Keep in mind, the idea behind the additional path feature is that multiple AS paths can coexist for a given prefix (from the same peer); i.e., a received path should not replace a path received earlier for the same prefix but with a different path id.
In bgpdump -m output, the new additional path id field appears as a new column in a record with a new TABLE_DUMP2_AP type. Here's the bgpdump output for a traditional record (for comparison) and a new AP record:
They added the path_identifier field "100" after the prefix. That was easy enough to emulate in bgpreader -m.
Here are the same two records in bgpreader -e format, without the new path_identifier field:
Option 0: add a new path id column after prefix.
Pro: this is the most obvious option. Authors of all existing code would be forced to consider if/how to deal with the new path id field.
Con: it breaks all existing code that parses bgpreader output, even if that code did not need to break, i.e. the code did not care about prefixes.
Option 1: add a new column to the end of each elem line.
Pro: Doesn't break code that doesn't care about prefix (e.g., just accumulating all possible paths or AS adjacencies) if it just ignores the extra column.
Con: Silently produces bad results in code that does care about prefix if it just ignores extra column.
Option 2: similar to bgpdump: add a new elem-type, with a new column. E.g., appending "a" to the elem-type indicates that there's a new additional path id column after the prefix:
Pro: wouldn't break existing code if it ignores elems with the unknown type. If that code cares about prefixes, it would ignore those elems, but at least it wouldn't produce invalid results.
Con: would break existing code that rejects the unknown elem type, even if that code didn't care about prefixes.
Option 3: add path id as a sub-field to prefix, e.g. separated by "#":
Pro: wouldn't break code that doesn't look at prefix. Code that does care about prefix will be forced to consider if/how to deal with the new path id field.
Con: awkward format
In all cases, code that doesn't care about prefixes could be easily modified to ignore the new path id field, so breaking that code isn't really that big of a deal.
I implemented option 3, although now I'm thinking option 0 might be better. @digizeph, @alistairking, what's your opinion?