aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-10-03 18:19:57 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-10-03 18:24:36 +0200
commit3fd60a5784eedb3dfb43ba456e0906623d718b47 (patch)
treed8f69eaf0a676459e54ee6c52c4278adc1911cf1
parent53e566247d7f8c10ed1876bd4c966f245b80e994 (diff)
osmux: Match remote address in osmux_lchan_find()
-rw-r--r--src/common/osmux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/osmux.c b/src/common/osmux.c
index cacc3aa5..02faab41 100644
--- a/src/common/osmux.c
+++ b/src/common/osmux.c
@@ -234,10 +234,15 @@ static struct gsm_lchan *osmux_lchan_find(struct gsm_bts *bts, const struct osmo
subslots = ts_subslots(ts);
for (subslot = 0; subslot < subslots; subslot++) {
struct gsm_lchan *lchan = &ts->lchan[subslot];
+ struct osmux_handle *h;
if (!lchan->abis_ip.osmux.use)
continue;
- if (lchan->abis_ip.osmux.local_cid == osmux_cid)
- return lchan;
+ if (lchan->abis_ip.osmux.local_cid != osmux_cid)
+ continue;
+ h = osmux_xfrm_input_get_deliver_cb_data(lchan->abis_ip.osmux.in);
+ if (osmo_sockaddr_cmp(&h->rem_addr, rem_addr) != 0)
+ continue;
+ return lchan; /* Found it! */
}
}
}