aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-11-17 18:30:00 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2022-11-17 18:30:00 +0100
commitffef40dbe6534168fc1829e936bb17e096b85e19 (patch)
treea3b477ae36461b8e3c54f514e11d7baa4d076dd8
parent035080e4f439a0536dd4865d54713a9df77b0ee3 (diff)
osmux: Use new osmux_xfrm_input API to set name on each linkpespin/osmux
Change-Id: Iaea980a2e11282add12f9af585500d90f0462279 Depends: libosmo-netif.git Change-Id 8bb688e4827f345416c2a4526ced956a07fcc60b
-rw-r--r--src/common/osmux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/osmux.c b/src/common/osmux.c
index fa0f7cc3..d74cce32 100644
--- a/src/common/osmux.c
+++ b/src/common/osmux.c
@@ -165,6 +165,7 @@ static void osmux_handle_put(struct gsm_bts *bts, struct osmux_in_handle *in)
static struct osmux_handle *osmux_handle_alloc(struct gsm_bts *bts, const struct osmo_sockaddr *rem_addr)
{
struct osmux_handle *h;
+ char name[128] = "to_";
h = talloc_zero(bts, struct osmux_handle);
if (!h)
@@ -178,6 +179,9 @@ static struct osmux_handle *osmux_handle_alloc(struct gsm_bts *bts, const struct
talloc_free(h);
return NULL;
}
+
+ osmo_sockaddr_to_str_buf(name + 3, sizeof(name) - 3, rem_addr);
+ osmux_xfrm_input_set_name(h->in, name);
/* sequence number to start OSMUX message from */
osmux_xfrm_input_set_initial_seqnum(h->in, 0);
osmux_xfrm_input_set_batch_factor(h->in, bts->osmux.batch_factor);