diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-10-03 18:19:57 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-10-03 18:24:36 +0200 |
commit | 3fd60a5784eedb3dfb43ba456e0906623d718b47 (patch) | |
tree | d8f69eaf0a676459e54ee6c52c4278adc1911cf1 | |
parent | 53e566247d7f8c10ed1876bd4c966f245b80e994 (diff) |
osmux: Match remote address in osmux_lchan_find()
Related: SYS#5987
Depends: libosmo-netif.git I95433b18802f73fa70e758f4aa02128eee940d88
Change-Id: I6813686b55fc3a74f1676a7965186e1e5fa00481
-rw-r--r-- | src/common/osmux.c | 9 |
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! */ } } } |