X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_path_list.c;h=7a9c328ce830498d6d2bc93971402e94d84636d4;hb=57b5860f013953ce161d05302e05370db9cd6ee2;hp=3e4c3333a08aa1c6f7c18e29d4c2e0a1f4c3e066;hpb=51822bf07a3f0fe72834ea94659faf6e262475ba;p=vpp.git diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c index 3e4c3333a08..7a9c328ce83 100644 --- a/src/vnet/fib/fib_path_list.c +++ b/src/vnet/fib/fib_path_list.c @@ -680,6 +680,16 @@ fib_path_list_create (fib_path_list_flags_t flags, fib_path_create(path_list_index, &rpaths[i])); } + /* + * we sort the paths since the key for the path-list is + * the description of the paths it contains. The paths need to + * be sorted else this description will differ. + */ + if (vec_len(path_list->fpl_paths) > 1) + { + vec_sort_with_function(path_list->fpl_paths, + fib_path_cmp_for_sort); + } } /*