USSD: save MO USSD's originating MSC's vlr_number
Save the source IPA name in ss_session, so we can send "invalid IMSI"
messages to the originating MSC.
Remove the fixed size from ss->vlr_number (we don't know the size of the
IPA name when it does not come from the database). Add
ss->vlr_number_len to give osmo_gsup_addr_send() the format it expects,
and to have one less place in the code where the IPA names are not
stored as blob.
Looking up the IPA name from struct osmo_gsup_conn could either be done
like in osmo_gsup_server_ccm_cb() by reading the IPA IEs (which has a
FIXME comment), or by finding the route associated with conn. I went
with the latter approach, because it seems cleaner to me.
Related: OS#3710
Change-Id: If5a65f471672949192061c5fe396603611123bc1
diff --git a/src/gsup_router.h b/src/gsup_router.h
index 282531d..bff484e 100644
--- a/src/gsup_router.h
+++ b/src/gsup_router.h
@@ -3,9 +3,18 @@
#include <stdint.h>
#include "gsup_server.h"
+struct gsup_route {
+ struct llist_head list;
+
+ uint8_t *addr;
+ struct osmo_gsup_conn *conn;
+};
+
struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs,
const uint8_t *addr, size_t addrlen);
+struct gsup_route *gsup_route_find_by_conn(const struct osmo_gsup_conn *conn);
+
/* add a new route for the given address to the given conn */
int gsup_route_add(struct osmo_gsup_conn *conn, const uint8_t *addr, size_t addrlen);