Commit
72fec87d9ef2cfb74db38e14b9db5775a76a0e92
by Pau Espin Pedrolss7 vty: Fix insert order of routes with higher priority
Route lookup ((hmrt_message_for_routing() => osmo_ss7_route_lookup() =>
osmo_ss7_route_find_dpc_mask())) iterates the list of routes assuming they are
ordered by mask length (so it doesn't need to iterate the full list every
time). Similary, it implicitly seems to assume that the entries are also
sorted by priority.
However, priority is not currently taken into account when being
inserted in the routing table, so the route ends up in the incorrect
place.
The VTY "update route" command used to first insert the route and only
*after* that tweak some of its fields, like priority or qos-class.
This commit adds a new set of osmo_ss7_route API which allows users to
*first* allocate a route and configure it completelly, and *second*
insert it once it contains all the information.
This way, the insert algorithm can take into account the configured
route priority and place the route entry in the routing table at the
proper place.
Related: SYS#7112
Change-Id: I6e7b5e3f06ae2c9468da58c55d2f42cbcd777218