Skip to content
Success

Changes

Summary

  1. ss7 vty: Fix insert order of routes with higher priority (details)
  2. ss7 vty: Handle 'update route ... qos-class default' properly (details)
  3. ss7 vty: Validate qos-class number being passed to 'update route' (details)
  4. ss7 vty: Limit qos-class range to 0-7 (details)
  5. 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.

Related: SYS#7112
Change-Id: I6e7b5e3f06ae2c9468da58c55d2f42cbcd777218
The file was modifiedsrc/osmo_ss7_vty.c
The file was modifiedsrc/ss7_internal.h
The file was modifiedsrc/osmo_ss7.c
The file was modifiedtests/vty/osmo_stp_route_prio.vty
Commit d466062b8e38187c04929d406704e04dae2dc569 by Pau Espin Pedrol
ss7 vty: Handle 'update route ... qos-class default' properly

If "default" is passed, use the default value generated by
ss7_route_alloc() (zero).

A follow-up patch will be submitted to also force the CLASS to be a
number.

Change-Id: I370bc19ef5cf2d21fa3408baf26bf8d1ce7bf362
The file was modifiedsrc/osmo_ss7_vty.c
Commit 15288921dd760f56075beb727ac80bf620813fb3 by Pau Espin Pedrol
ss7 vty: Validate qos-class number being passed to 'update route'

While at it, organize the related strings used in several places in the
file.

Change-Id: Ib81499d5ac692e1de463efe931381bbb68fd1131
The file was modifiedtests/vty/osmo_stp_test.vty
The file was modifiedsrc/osmo_ss7_vty.c
Commit ff98248ff2863903fef6cfb98559e6583d2dde8c by Pau Espin Pedrol
ss7 vty: Limit qos-class range to 0-7

This matches QoS ranges used by other vendors.

Change-Id: I541723e4551977cb2b7afcac01e3bfee070e7bac
The file was modifiedtests/vty/osmo_stp_test.vty
The file was modifiedsrc/osmo_ss7_vty.c
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.

Change-Id: I4e283cc07b8e9ea2124ec9da18cbce77c3d866ee
The file was modifiedsrc/osmo_ss7.c
The file was modifiedsrc/osmo_ss7_vty.c
The file was modifiedtests/vty/osmo_stp_test.vty
The file was modifiedsrc/ss7_internal.h
The file was modifiedtests/vty/osmo_stp_route_prio.vty