bgpd: add aspath_aggregate_mpath that preserves path length

Issue - when two aspaths are aggregated the result will be with
different length if the two paths do not share common prefix.

E.g.: aggregation of 100 101 400 500 and 200 201 400 500 currently
will result in {100,101,200,201,400,500} which is of much shorter
length and is not ok to be readvertised becase may create shortest
path on the internet and cause infinite flapping.

aspath_aggregate_mpath will construct the followin path for the
above example: {100,200} {101,201} 400 500

Signed-off-by: Boian Bonev <bbonev at ipacct.com>

patchwork #994: http://patchwork.quagga.net/patch/994/
3 files changed