pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29571 )
Change subject: osmux: Match remote address in osmux_lchan_find() ......................................................................
osmux: Match remote address in osmux_lchan_find()
Related: SYS#5987 Depends: libosmo-netif.git I95433b18802f73fa70e758f4aa02128eee940d88 Change-Id: I6813686b55fc3a74f1676a7965186e1e5fa00481 --- M src/common/osmux.c 1 file changed, 7 insertions(+), 2 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/common/osmux.c b/src/common/osmux.c index cacc3aa..02faab4 100644 --- a/src/common/osmux.c +++ b/src/common/osmux.c @@ -234,10 +234,15 @@ 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! */ } } }