ss7 vty: Set default route priority to 5 (details)
Commit
64e70ab8c20b5acc8e4717d5bcb08fcecf46bd98
by Pau Espin Pedrol
ss7 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.
Commit
e553caec920bce33ce6b4cf150ba994545ed242e
by Pau Espin Pedrol
ss7 vty: Set default route priority to 5
Use a priority != 0 (best prio) as default priority. This allows adding manual routes with higher prio (lower value) more easily. Value 5 is chosen to resemble other systems users may be already used to.
Changing the default priority value in routes now shouldn't be much of a problem, since the only way to set up a specific priority (VTY) was broken until now and would return an error, so we know for sure nobody has been setting priorities other than the default value. Hence, with this change even older implementations reading a backward compatible file would still work the same by using all-prio-0 instead of all-prio-5.
The "update route" VTY cmd gets a new "default" param value for the "priority" param, hence getting some syntatic sugar which also helps users understand what's the default value through the CMD help string.